Search:

Type: Posts; User: redsfan

Search: Search took 0.00 seconds.

  1. Replies
    3
    Views
    895

    I have had this happen before, sometimes when I...

    I have had this happen before, sometimes when I have still had the program open from previous debugging, as others have said. I have also had this happen randomly and after recompiling it again it...
  2. Replies
    11
    Views
    2,049

    I have now changed my code to use a vector...

    I have now changed my code to use a vector instead of an array and everything is working ok, but I have an issue with one of the vector's.

    I have had to declare the vector "code" globally to get...
  3. Replies
    11
    Views
    2,049

    I did not know about the min and max functions,...

    I did not know about the min and max functions, but now I do. That all makes sense, thanks to both of you.
  4. Replies
    11
    Views
    2,049

    One other question. In the code you posted, you...

    One other question. In the code you posted, you declare the std namespace before vector, is there an advantage to doing this over putting using namespace std in the declarations.
  5. Replies
    11
    Views
    2,049

    Ok, thanks.

    Ok, thanks.
  6. Replies
    11
    Views
    2,049

    Thanks, I am going to look into vector's. I have...

    Thanks, I am going to look into vector's. I have just been reading about bounds checking, from what I understand there are 2 types, index checking, range checking.

    Now I get index checking, making...
  7. Replies
    11
    Views
    2,049

    I knew someone would mention using a vector, I am...

    I knew someone would mention using a vector, I am going to do some reading on them and as long as it doesn't mean altering the structure of my program too much, I will probably implement them. What...
  8. Replies
    11
    Views
    2,049

    Dynamic 2d array

    I found some code for allocating and deallocating a dynamic 2d array, I modified it for my program and everything seems to work as it should. However I saw a comment saying this code could cause some...
  9. Replies
    2
    Views
    1,275

    Aah that does it, thanks.

    Aah that does it, thanks.
  10. Replies
    2
    Views
    1,275

    Writing array to a file

    I am trying to write my array to a file but I have a slight problem. The code below writes the array to the file but it also writes a new line after each element is written and I want the whole array...
  11. Replies
    5
    Views
    1,374

    yep, that makes sense, cheers

    yep, that makes sense, cheers
  12. Replies
    5
    Views
    1,374

    Thanks, that explains some strange behavior I was...

    Thanks, that explains some strange behavior I was getting, when inputting more than 10 strings for case 4:

    what is the best way to stop a user adding more strings than I want, if statement?


    ...
  13. Replies
    5
    Views
    1,374

    Just a couple of questions

    Why can I seem to use outside the Arrays limit [10][10]? For instance if I use the following code, it assigns and outputs the arrays element.


    code[1][50] = "outside array";
    cout << code[1][50];...
  14. Thread: newbie problem

    by redsfan
    Replies
    6
    Views
    1,198

    Sorry I didn't know there was a link in there, I...

    Sorry I didn't know there was a link in there, I was wondering what page you were reffering too:rolleyes: So I went of looking when you told me what the problem was and fflush(stdin)
    was the first...
  15. Thread: newbie problem

    by redsfan
    Replies
    6
    Views
    1,198

    Ahh I see, that works fine, thanks.

    Ahh I see, that works fine, thanks.
  16. Thread: newbie problem

    by redsfan
    Replies
    6
    Views
    1,198

    Thanks mk27 that explains it and it was fixed by...

    Thanks mk27 that explains it and it was fixed by putting in fflush(stdin); :)

    Could you tell me what you are doing in this following line?


    int main(int argc, char *argv[])

    It looks like...
  17. Thread: newbie problem

    by redsfan
    Replies
    6
    Views
    1,198

    newbie problem

    Hello,

    I am just starting out in learning C and I want to make a simple program that creates a string, from the options a user inputs and then sorts that string into a correct format for display....
Results 1 to 17 of 17