LerN Posted July 4, 2017 Author Share Posted July 4, 2017 (edited) Nothing Edited July 4, 2017 by LerN Link to comment Share on other sites More sharing options...
Xandy Posted July 4, 2017 Share Posted July 4, 2017 (edited) Just made this code. I'll have to go back and see how you're doing timing (I normally use SDL libraries) But this works it bangs Hello World out at the console. I'll make an fopen version and check how you're doing timings like I said. #include <fstream> int main(int argc, char *argv[]) { for (int i = 0; i < 1000; i++) { fprintf(stderr, "Hello World\n"); } fprintf(stderr, "Program exited\n"); return 0; } // END main(int argc, char *argv[]) The loop is so I have a chance to see it. Edited July 4, 2017 by Xandy Human Male Programmer (-_-) Xandy About (^o^) Discord - Xandy Programmer MapIt (Tile world editor, Image Tile Extractor, and Game Maker) Link to comment Share on other sites More sharing options...
Xandy Posted July 4, 2017 Share Posted July 4, 2017 (edited) Removes file stderr.txt (to delete contents each run) Populates a stderr.txt file with output. #include <fstream> int main(int argc, char *argv[]) { // Blank out the file by removing it remove("stderr.txt"); // Open stream to file for appending data FILE *file = fopen("stderr.txt", "a"); for(int counter = 0; counter < 10000; counter++){ // Percent d %d b/c counter is decimal number fprintf(file, "%d: Hello World\n", counter); } ; Close the file stream fclose(file); return 0; } // END main(int argc, char *argv[]) I see timing isn't important in the code. You're not doing it there so I ignored a timer. It is SO fast. Edited July 4, 2017 by Xandy Fr33b0w 1 Human Male Programmer (-_-) Xandy About (^o^) Discord - Xandy Programmer MapIt (Tile world editor, Image Tile Extractor, and Game Maker) Link to comment Share on other sites More sharing options...
LerN Posted July 4, 2017 Author Share Posted July 4, 2017 You're right it's so fast i was using bad code. Link to comment Share on other sites More sharing options...
Xandy Posted July 4, 2017 Share Posted July 4, 2017 I learned about: WritePrivateProfileString here Human Male Programmer (-_-) Xandy About (^o^) Discord - Xandy Programmer MapIt (Tile world editor, Image Tile Extractor, and Game Maker) Link to comment Share on other sites More sharing options...
LerN Posted July 5, 2017 Author Share Posted July 5, 2017 I also learned how to write the good code and i learned about fprintf Link to comment Share on other sites More sharing options...
LarsJ Posted July 5, 2017 Share Posted July 5, 2017 A possible conclusion: C/C++ seems to be faster. AutoIt seems to be easier. TheDcoder and LerN 2 Controls, File Explorer, ROT objects, UI Automation, Windows Message MonitorCompiled code: Accessing AutoIt variables, DotNet.au3 UDF, Using C# and VB codeShell menus: The Context menu, The Favorites menu. Shell related: Control Panel, System Image ListsGraphics related: Rubik's Cube, OpenGL without external libraries, Navigating in an image, Non-rectangular selectionsListView controls: Colors and fonts, Multi-line header, Multi-line items, Checkboxes and icons, Incremental searchListView controls: Virtual ListViews, Editing cells, Data display functions Link to comment Share on other sites More sharing options...
Xandy Posted July 5, 2017 Share Posted July 5, 2017 14 hours ago, LerN said: I also learned how to write the good code You didn't learn that from me. Human Male Programmer (-_-) Xandy About (^o^) Discord - Xandy Programmer MapIt (Tile world editor, Image Tile Extractor, and Game Maker) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now