- 0
[C++] carriage return with fputs()?
-
Recently Browsing 0 members
- No registered users viewing this page.
-
Posts
-
By Aditya Tiwari · Posted
Apple finally brings the slider for Liquid Glass and many other changes by Aditya Tiwari Apple kicked off the official live stream of the WWDC 2026 annual developer event. The company began its latest wave of announcements with changes to the controversial Liquid Glass design language, which debuted last year across Apple's entire software ecosystem. A lot of people didn't like Liquid Glass when it first arrived on iPhone and other devices last year. The devices were plagued with transparency issues and whatnot. While Apple improved things over the year, it has now added a new Liquid Glass slider that lets you switch the transparency from clear to opaque. The sidebars now expand to the edge of the window. When you scroll the UI sideways, the refraction continues beneath the sidebar rather than being cut off at the boundary. Moreover, Apple has changed the way Liquid Glass is rendered across the system. There is a separation between different layers, which makes buttons in the toolbar stand out from the background. Apple said it "deeply appreciates" the feedback it received from users and has made adjustments to Liquid Glass. -
By cork1958 · Posted
FWIW, I've been using Helium on Linux and Windows since the first time it was mentioned here. Actually, maybe a day or 3 before, as I searched for it when I saw it mentioned on the MX Linux forums. Haven't had a single issue on either OS. Not bad for a beta. -
By AsherGZ · Posted
See up until a few years ago y'all could get away with simply denying your war crimes, pretending it never happened. Unfortunately for you, it's the 2020s and Israel's genocide has been livestreamed in real time. You have to be dumber than a rock to think anyone still believes your propaganda. See the cat is already out of the bag. The world already knows who you are so do yourself a favor and just drop the facade. Bet it gets real tiring keep track of all the lies. Take some inspiration from Israeli ministers who boast on live TV they like massacring civilians. Every zionist accusation is after all a confession. -
By QuantumBigfoot · Posted
He's just reporting what Microsoft posted. https://msmessagecenter.com/MC1381119 It just means that Windows Defender updates will no longer be bundled into the monthly Cumulative Windows security update and will now be a separate download. They'll still be on Microsoft update of course but now they can be released faster. -
By TarasBuria · Posted
Apple announces iOS 27 with no changes to the list of supported iPhones by Taras Buria At WWDC 2026 in Cupertino, Apple announced iOS 27, the next mobile operating system for compatible iPhones. The update focuses on tweaking and improving last year's iOS 26, particularly in areas like app launch time, Liquid Glass design, and more. Additionally, Apple has reworked Apple Maps with a significantly enhanced Flyover view for a much more realistic view. Apple also promises better performance, smarter search, new Health features, new parental controls, and more. The most important part is that iOS 27 is compatible with all iPhones that can run iOS 26. That means that even the seven-year-old iPhone 11 can run iOS 27 (supposedly better than iOS 26). iOS 27 will be available this Fall, with the first developer betas expected later today. You can follow the live stream here.
-
-
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