array trouble

This is a discussion on array trouble within the C++ Programming forums, part of the General Programming Boards category; I am using the getchar() function to enter some charicters into an array but I cannot get it to reconize ...

  1. #1
    Registered User
    Join Date
    Mar 2002
    Posts
    17

    Exclamation array trouble

    I am using the getchar() function to enter some charicters into an array but I cannot get it to reconize the return charicter. I used char(13) but it did not work. Is there another way to represent the return button here is my code:


    while(input[j][g-1] !=char(13))
    {
    input[j][g]=getchar();
    g++;
    }

  2. #2
    Registered User
    Join Date
    Mar 2002
    Posts
    17

    Thumbs up

    Man I new it was something simple. Thanks alot it worked perfect.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Trouble moving lines up in 2D array
    By powell5487 in forum C Programming
    Replies: 5
    Last Post: 03-03-2009, 12:54 PM
  2. Array trouble
    By Cpro in forum C++ Programming
    Replies: 4
    Last Post: 12-06-2006, 01:55 PM
  3. trouble creating an array
    By s_ny33 in forum C++ Programming
    Replies: 7
    Last Post: 04-25-2005, 12:18 PM
  4. Template Array Class
    By hpy_gilmore8 in forum C++ Programming
    Replies: 15
    Last Post: 04-12-2004, 12:15 AM
  5. Help with an Array
    By omalleys in forum C Programming
    Replies: 1
    Last Post: 07-01-2002, 09:31 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21