Search:

Type: Posts; User: motarded

Search: Search took 0.01 seconds.

  1. Replies
    1
    Views
    1,114

    Can't assign int value to array of ints

    ACTUAL TITLE: CAN'T ASSIGN IN VALUE TO ARRAY OF INTS....sorry, I was issuing weapons while writing this and got distracted....
    Ok...this is really irritating me...I've been putting a DOS based...
  2. Replies
    6
    Views
    22,764

    Hmm...I guess I could store them as a...

    Hmm...I guess I could store them as a bidimensional array of strings....hmmmmmmmm
  3. Replies
    6
    Views
    22,764

    Here's what I have right now: void...

    Here's what I have right now:



    void Player::GetWord()
    {
    srand( (time(NULL) );
    int NumLines(0), RandNum, length;
    ifstream File;
    char * buffer;
  4. Replies
    6
    Views
    22,764

    Ok...I wrote it all down and it made a little...

    Ok...I wrote it all down and it made a little more sense...

    I read it all into a buffer, then go through and see how many '\n' characters there are. But how can I declare the positions after the...
  5. Replies
    6
    Views
    22,764

    Move pointer to next line in .txt file

    I'm trying to select a value at random from a .txt document. Each value is on a separate line (I understand that the computer interprets that as Value 1\nValue 2\n Value3).

    Example.txt

    ...
  6. Replies
    11
    Views
    1,622

    MFC = ? On the topic of learning about...

    MFC = ?

    On the topic of learning about GUI's....does anyone have a link to a good tutorial? Unfortunately, the book option isn't an option in Africa. I'm not looking for a 24 hour fix or...
  7. Replies
    19
    Views
    1,988

    SM, I compile and run the code that Daved...

    SM,
    I compile and run the code that Daved posted, and if I enter "4 ajfie" it still reads as invalid input. The only way it will accept the input is if it is a float, and only a float...
  8. Replies
    3
    Views
    3,886

    Verifying int with while(!(cin >> num))

    Ok....this code



    #include <iostream>
    #include <limits>

    using namespace std;

    int main()
  9. Replies
    19
    Views
    1,988

    Daved, thanks a lot. That code works well. I...

    Daved, thanks a lot. That code works well. I understand this part:



    while(!(cin >> f1))


    This means that if the input is not a float number, the while loop will continue to loop.

    But...
  10. Replies
    6
    Views
    1,700

    Are there any restrictions on your assignment; as...

    Are there any restrictions on your assignment; as far as what you HAVE to have included? Or do you just need to write code to convert 5, 6, 7, 8, 9 to 5, 6, 7, 7, 7?
  11. Replies
    19
    Views
    1,988

    Maelstrom, I tried that, but if the users inputs...

    Maelstrom, I tried that, but if the users inputs a number in the beginning, followed by incorrect characters, then rather than giving an error message, the program just assumes that is the number...
  12. Replies
    19
    Views
    1,988

    That only applies to strings. Originally, I was...

    That only applies to strings. Originally, I was just using a float variable. The problem with having the user input a string is that I can't add them to each other. So Verify.cpp takes the string...
  13. Replies
    19
    Views
    1,988

    How would I go about clearing the state of the...

    How would I go about clearing the state of the stream?
  14. Replies
    19
    Views
    1,988

    Accessing other .cpp files

    I'm relatively new to programming and I'm having a little bit of trouble. I'm putting together a calculator program that adds, subtracts, whatever. When the addition function is called, it prompts...
Results 1 to 14 of 14