- 0
[C++] carriage return with fputs()?
-
Recently Browsing 0 members
- No registered users viewing this page.
-
Posts
-
-
By loaderbull · Posted
I have updated my Series 9 Watch so I assume there is either a mistake in what was said, or as suggested - the new AI feature set isn’t supported on anything other than those listed above. -
By David Uzondu · Posted
WhatsApp slams Isreali firm, NSO Group, for trying to spy on its users by David Uzondu WhatsApp has come out accusing Israeli cyber-intelligence firm, NSO Group, of deploying a fresh wave of highly targeted "spear phishing" attacks against users, which its security teams successfully thwarted. The Israeli firm, according to WhatsApp, ran this operation like its usual one-click phishing campaigns, trying to get people to click malicious links that lead them to external sites. To coordinate the campaign, the spyware vendor created fake test accounts and groups on the messaging app. WhatsApp said it is sharing the specific malicious domains, ikhwancast[.]com, ghazacast[.]com, and fr24cast[.]com, because potential victims need this data to check if they were targeted across other messaging systems or email platforms. The NSO Group is infamous for creating and selling Pegasus, a military-grade commercial spyware capable of silently compromising smartphones simply by sending a message or placing a missed call via apps like WhatsApp or iMessage. Users do not even have to interact with the incoming notification before the infection takes hold. Once Pegasus manages to break in, the spyware harvests private data, letting operators read private messages, emails, photos, and documents. It also tracks precise GPS locations, records keystrokes, activates the device's camera, and monitors live microphone audio. Independent investigations by cybersecurity watchdogs like The Citizen Lab and human rights organizations like Amnesty International have proven that governments use this software to track humanitarian workers, journalists, diplomats, and political dissidents. These findings directly contradict NSO Group claims that clients use the technology to spy on criminals and terrorists only. In late 2021, the U.S. Department of Commerce added the firm to its Entity List, effectively banning the vendor from buying hardware and software from American tech companies. WhatsApp said in its blog post that the spyware vendor violated a permanent court injunction with this new spear-phishing campaign. This injunction, which took effect in 2025, strictly prohibited NSO Group from targeting WhatsApp and its users. The platform is now asking a federal court to hold the firm in contempt. -
By ZipZapRap · Posted
Cool. It definitely needed some work before -
By JayZJay · Posted
It would be surprising if even 3 year old Apple Watches (and not SE models at that) cannot run watchOS 27. Granted, it doesn't mean it would work as well. We'll see.
-
-
Recent Achievements
-
Captain_Eric earned a badge
Very Popular
-
amusc earned a badge
One Month Later
-
DJC50PLUS earned a badge
One Month Later
-
DJC50PLUS earned a badge
Week One Done
-
Eric Biran went up a rank
Proficient
-
-
Popular Contributors
-
Tell a friend
Question
The Teej
Okay, it's 2am, and I'm at my wits end.
I'm trying to output a bunch of variables to a file, with 2 numbers and a carriage return on each line.
I have two global int arrays declared all with variables in them.
void FileOutput() { FILE *f = fopen ("myfile.txt", "wb"); if (f == NULL) die("Couldn't open myfile.txt for writing, sorry"); else { int x; char temp_string[20]; for (x = 0; x <= 4; x++) { sprintf(temp_string, "%i %i \n", x_pos[x], y_pos[x]); //printf("%i %i", x_pos[0], y_pos[0]); printf("Calm down sir, PLEASE\n"); fputs (temp_string, f); } fclose(f); } printf("Don't worry sir, I'm from the internet\n"); }Now, it puts it in the file fine, however, it all comes out as one line. The output on the screen comes out fine and I get carriage returns as expected there, however. I'd like it to come out this like this:
82 103
49 134
953 535
354 53
3535 234
The variables are purely aribtrary, this is an extension of a tutorial I'm following (I'm doing Wii homebrew development). I have to say, I've been doing programming for a while, and yet, I've never come across an issue quite like this that I haven't been able to resolve so easily.
Shoving \n everywhere does nothing (in regards to file output). I've tried injecting it when doing fputs() and also at the sprintf part, neither work. Honestly running out of ideas here. Anyone able to give me a hand figuring out what I'm doing wrong here?
Major thanks in advance.
Link to comment
https://www.neowin.net/forum/topic/997904-c-carriage-return-with-fputs/Share on other sites
14 answers to this question
Recommended Posts