Search:

Type: Posts; User: evilkillerfiggi

Search: Search took 0.01 seconds.

  1. Shell output into program during runtime

    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...
  2. I played around and everything seems to have...

    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...
  3. Well, I'm confused by the whole concept of...

    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...
  4. STL:Cycling through elements in a Map

    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...
  5. Okay, well, for an example here's a cut-down of a...

    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...
  6. Passing if/ofstream objects by reference

    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...
  7. Replies
    2
    Views
    1,357

    Okay, thanks very much! I wasn't aware char...

    Okay, thanks very much! I wasn't aware char pointers could be set to strings that easily. But it all works now, so thanks.
  8. Replies
    2
    Views
    1,357

    Allocating Arrays on the Free Store

    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...
  9. Replies
    7
    Views
    1,367

    I don't like system("pause") because it adds...

    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...
  10. Replies
    7
    Views
    1,367

    Preventing User Input from Keyboard

    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...
  11. Replies
    5
    Views
    2,359

    Yeah, dwks is right, there was a lot more code......

    Yeah, dwks is right, there was a lot more code...
    But thanks very much!
  12. Replies
    5
    Views
    2,359

    There was a lot more code, but it was all...

    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...
  13. Replies
    5
    Views
    2,359

    Help with getline() and file reading

    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...
Results 1 to 13 of 13