Search:

Type: Posts; User: Josh Norton

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. ...

    Ahh got it. Thanks.
  2. Replies
    44
    Views
    3,728

    What exactly is that and why is it good style? I...

    What exactly is that and why is it good style? I always just delete it when the compiler adds it in heh.
    :D
  3. hmm. Maybe incorrect but, it works fine as it's...

    hmm. Maybe incorrect but, it works fine as it's written in my compiler.



    #include <iostream>
    #include <conio.h>

    using namespace std;

    struct MyBools
  4. ...

    I dont know a lot about structs but, that's the first time I have seen a colon used in them. Is that an error or? If your trying to assign an initial value to each of them I don't think your...
  5. ...

    I have'nt compiled the code yet but just off hand I see that the output operator (<<) is backwards in the entire cout statement that outputs the structure.
  6. Thread: Moving On

    by Josh Norton
    Replies
    11
    Views
    2,105

    ...

    Working now.
  7. Thread: Moving On

    by Josh Norton
    Replies
    11
    Views
    2,105

    Not sure if the site is down or the url is bad...

    Not sure if the site is down or the url is bad but the link is not working.
  8. Replies
    11
    Views
    3,058

    ....

    I think you missed the question.
  9. Replies
    12
    Views
    1,664

    ....

    ok. When I had 'i' declared size_t and the loop got below zero it was seg faulting since i would roll over(I guess) to the max value for an unsigned int( 4294967295 when I just tried it). I'm not...
  10. Replies
    12
    Views
    1,664

    ....

    I'll just post it all... It's not an error. Just a warning. It reads:



    lab7.cpp(93) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data


    The loop...
  11. Replies
    12
    Views
    1,664

    ...

    I know comparing a syze_t type to an int in my for loop caused a seg fault. I guess since size_t was unsigned and being compared to a negative value(or so I assumed)? I changed "i" to an int and it...
  12. Replies
    18
    Views
    3,860

    ...

    Well. Corrected it in dev C++ anyways. VC7 still skips right through the getline call. =/
  13. Replies
    18
    Views
    3,860

    ...

    Bah nevermind. Of course I find the answer as soon as I post the problem.


    cin.ignore()

    seemed to correct it.

    ~Joshua Norton
  14. Replies
    18
    Views
    3,860

    .......

    I was just having a problem using getline myself and I found this thread in the search. Just wanted to note that



    char name[15];
    cin.getline ( name, '\n' );


    Does not work. I think...
  15. Replies
    12
    Views
    1,664

    ...

    Certainly fixed all the errors though. I will search for it and try and find info. Thanks for the help Sebastiani.

    ~Joshua Norton
  16. Replies
    12
    Views
    1,664

    ...

    I also get
    "signed unsigned mismatch" when comparing the size to an int in a for loop.

    Not sure what a size_t is. Im guessing it's a type created in the string header or something? Is it just...
  17. Replies
    12
    Views
    1,664

    String issues

    Hey,

    I am writing a palindrome app for a class. I'm having a problem though using size() or length() for the string lengths. I keep getting a typecast error but I am almost sure I am...
  18. Replies
    9
    Views
    3,550

    ...

    The window disappears because once the program is done running it has no reason to remain open. You can use a function to hold the window open for you like
    system("PAUSE"); on a windows box. You...
  19. Replies
    3
    Views
    2,557

    ...

    Thanks. This avoided the error. I added pennies++ to your addition to account for the fact that .0099 does represent the last penny.

    Thanks again!
  20. Replies
    3
    Views
    2,557

    problem with some simple code =/

    Ok so I'm trying to write a console app that will take from the user the amount of money due and the amount of money tendered and make change. One of the requirments was to use reference parameters...
  21. Replies
    8
    Views
    1,092

    ...

    Well it was almost correct.



    #include <iostream>
    #include <stdlib.h>

    using namespace std;

    int main(void) {
  22. Replies
    8
    Views
    1,092

    ...

    Yeah I see what your saying. I had both uses in my app and had both set backwards heh.
  23. Replies
    8
    Views
    1,092

    ...

    Nm. Another retarded question lol. For some reason I had confused the middle argument of the for loop as the "while this condition is false" when in reality it's saying "while this condition is...
  24. Replies
    8
    Views
    1,092

    ...

    err why would the second loop be


    for (int i = 0; i < 8; i++)

    when the valid array elements are 0 - 7?
  25. Replies
    8
    Views
    1,092

    ...

    Thanks for the fast response. I knew I was staring too hard and overlooking something silly :D. Thanks again.
Results 1 to 25 of 26
Page 1 of 2 1 2