I'm writing a program that needs to call a shell command during runtime. The output of said command needs to come back into the program as a c++ string.
At first I just used
system("echo...
Type: Posts; User: evilkillerfiggi
I'm writing a program that needs to call a shell command during runtime. The output of said command needs to come back into the program as a c++ string.
At first I just used
system("echo...
I played around and everything seems to have sorted itself out... The operator= seems to have been unnecessary after all, and now that I know to point to iter->second->string rather than iter->string...
Well, I'm confused by the whole concept of iterators, really. I've never heard of the first/second thing- but from your code I'd guess it links the interpreter to either the access variable or the...
I have a map of my own class, accessed by a string. I need to cycle through this map and access each element in turn.
I've read a lot about 'iterators' but been able to comprehend none of it, and...
Okay, well, for an example here's a cut-down of a random name generator I was trying to make- I was using a txt file called namlib.txt which was full of names, separated by headers like &&SURNAME or...
I've been having a persistent problem about something I really really don't understand:
I'm using the ifstream and ofstream objects to read to and write from files. They seem to work fine provided...
Okay, thanks very much! I wasn't aware char pointers could be set to strings that easily. But it all works now, so thanks.
I'm attempting to make a random name generator - for this I was going to pull in about a hundred names from a txt file into an array, and access the array using a random number. If this is a clumsy...
I don't like system("pause") because it adds whacking great 'press to continue' strings when it runs.
i am in fact making a text adventure thing like, you, Ruski. This means i need the user to be...
I'm writing a program in which I want the program to stop at certain points and wait for the user to press Return before continuing.
So far I've tried cin.get() and cin.getline(), but these have...
Yeah, dwks is right, there was a lot more code...
But thanks very much!
There was a lot more code, but it was all manipulating strings and wasn't really relevent.
But the clear() function works perfectly, thanks very much!
Do you know of anywhere I could go to find...
I should point out first that I'm very new to C++: I can use functions cin, cout, getline and a few from the library string.h.
I am attempting to use ifstream to pull in text line by line from a...