- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 3
- Posts with Upvotes
- 3
- Upvoting Members
- 2
- Downvotes Received
- 6
- Posts with Downvotes
- 4
- Downvoting Members
- 3
11 Posted Topics
Hello, I want to learn how to make a syntax highlighter in vc++ 2010. What should I do?
How can I read a string within a string without using substr? void ReadStrInStr() { string Str; Str = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; //cout "A-J" in Str }
How can I parse through a large file in a fast and efficient way?
I need to be able to read and write huge files that nearly weighs 20+GB and I need to do it fast. Any suggestions or tips? Thanks.
Credits to me, here you go: [CODE] int CountUnsoldTicket = 50, CountSoldAdultTicket = 0, CountSoldKidTicket = 0, CountSoldSeniorTicket = 0, CountSoldFamilyTicket = 0, CountSoldTicket = 0; void BuyTicket(string TicketDealerMsg, int &CountPurchasingTicket, int &TicketType) { if(CountUnsoldTicket > 0) { cout << endl << TicketDealerMsg << endl; cin >> CountPurchasingTicket; if(CountPurchasingTicket < …
When I get home, I'll write the code for you.
[CODE] void IfElseLoopExample() { int Month; cout << "Please enter a numerical value of a month: " << endl; cin >> Month; if(Month <= 12) { cout << "A valid month has been entered." << endl; } else if(Month > 12 || Month < 0) { cout << "That is …
Hello everyone, I've attempted to use ifstream to open and read a 20GB file but failed to do so (it takes a very very very long period of time...). So, I need find a fast way to open and read a 20GB .txt file in C++. Thank you!
Hello everyone, I am having a hard time reading and writing a UTF-8 file in visual c++ 2010. [CODE] void ReadUTF8File() { ifstream UTF8File("C:\\DaniWeb\\Desktop\\UTF8File.txt"); /* UTF8File.txt: ☺☻♥♦♣♠•◘○ */ string UTF8FileStr; if(UTF8File.is_open()) { while(!UTF8File.eof()) { UTF8File >> UTF8FileStr; cout << UTF8FileStr << endl; /* cout: ∩╗┐Γÿ║Γÿ╗ΓÖÑΓÖªΓÖúΓÖáΓÇóΓùÿΓùï */ } } UTF8File.close(); } …
I am currently in high school and I am also learning c++ (noobie). I was interested in this thread because, I have never tried coding a function that could search a string in an input file and output the results into an output file. This is my first attempt. This …
OOPS! SORRY WRONG SECTION, I WANTED TO POST IN THE C++ SNIPPETS.. This piece of code will search for a string in a text file and write the results into another file along with the line number. [CODE] void IOSearchString() { string SearchString, InputFilePath, OutputFilePath, InputFileLine; cout << "Welcome!" << …
The End.
Tygawr