Thread: Just paste this into your editor..

  1. #16
    left crog... back when? incognito's Avatar
    Join Date
    Oct 2001
    Posts
    1,427
    Man I am about to call it a night.......I'll check back in about 5 minutes while I get my bed ready and so on......if you don't have it by then I am sorry.......you could try bloodshed.net I think it is they have DevC++ it's either .net or .com not sure. Good Luck.
    There are some real morons in this world please do not become one of them, do not become a victim of moronitis. PROGRAMMING IS THE FUTURE...THE FUTURE IS NOW!!!!!!!!!

    "...The only real game I thank in the world is baseball..." --Babe Ruth

    "Life is beautiful"-Don Corleone right before he died.

    "The expert on anything was once a beginner" -Baseball poster I own.


    Left cprog on 1-3-2005. Don't know when I am coming back. Thanks to those who helped me over the years.

  2. #17
    Registered User
    Join Date
    Jan 2002
    Posts
    71
    No, actually someone suggested it today, and I asked them if they were sure it's better than Borland C++ 5.5, and they didn't answer..
    So it's good?
    I used to use Turbo C++ 4.5 and it was great, until I used strcpy; then it kept crashing (on a line identical to the one you're getting an error message on now) while the same line worked on the compiler at school (Borland C++ 4.5 I think). So I decided to get another compiler.. But I've had no luck so far.

    If you figure out why it's giving that error, please let me know (It's 2:20 a.m., I'm leaving).. Neither rightanswer nor line are integers, I don't know what's wrong there..

    But thanks a lot for your help.

    Linette

  3. #18
    left crog... back when? incognito's Avatar
    Join Date
    Oct 2001
    Posts
    1,427
    I was trying your code with Borland 5.2......... I tried it with DevC++ and I changed void main() to int main() and got one less error Don't really know why...
    There are some real morons in this world please do not become one of them, do not become a victim of moronitis. PROGRAMMING IS THE FUTURE...THE FUTURE IS NOW!!!!!!!!!

    "...The only real game I thank in the world is baseball..." --Babe Ruth

    "Life is beautiful"-Don Corleone right before he died.

    "The expert on anything was once a beginner" -Baseball poster I own.


    Left cprog on 1-3-2005. Don't know when I am coming back. Thanks to those who helped me over the years.

  4. #19
    Pygmy Monkey ErionD's Avatar
    Join Date
    Feb 2002
    Posts
    408

    Maybe....

    Maybe it doesnt like your count using in the array...

  5. #20
    Registered User
    Join Date
    Jan 2002
    Posts
    71
    Can anyone figure out why those last two errors occur?


    Thanks

  6. #21
    Registered User
    Join Date
    Oct 2001
    Posts
    2,934
    >strcpy (item[count].rightanswer, line);
    //Should be:
    item[count].rightanswer = line[0];

    //Also you might need to convert it to uppercase using toupper(), located in header ctype.h
    item[count].rightanswer = toupper(line[0]);

  7. #22
    Registered User
    Join Date
    Oct 2001
    Posts
    2,934
    Actually the uppercase should go here:
    Code:
    >      cout << "Your Answer: ";
    >      cin >> ans[count];
          ans[count] = toupper(ans[count]);
    >   }
    >   return;    
    }
    //And change this function declaration (add &)
    >void evaluate (qtype item[12], char ans[12], int right) {
    to:
    void evaluate (qtype item[12], char ans[12], int &right) {

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. WYSIWYG editor problem
    By Akkernight in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 04-01-2009, 08:50 AM
  2. Replies: 19
    Last Post: 05-30-2007, 05:47 PM
  3. Replies: 12
    Last Post: 08-05-2003, 02:16 PM
  4. OpenGL terrain demo (EDITOR)
    By Jeremy G in forum Game Programming
    Replies: 2
    Last Post: 03-30-2003, 08:11 PM
  5. PFE (prorgammers file editor, for Windows)
    By Unregistered in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 06-09-2002, 11:01 AM