Thread: new student

  1. #1
    Registered User
    Join Date
    May 2007
    Posts
    8

    new student

    i am a new student of cprgramming. i waned a basic sample of getchar() function so, please help me.

  2. #2
    Registered User
    Join Date
    May 2007
    Posts
    8
    a sample of a getchar() function

  3. #3
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,412
    Take a look at cppreference.com's Standard C I/O pages.

    As I stated in the other (now deleted) thread, read the forum guidelines, read the homework policy (also at the announcements section), search the board and search the Web before you ask. Oh, and use descriptive names for your threads.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  4. #4
    Deathray Engineer MacGyver's Avatar
    Join Date
    Mar 2007
    Posts
    3,210
    Code:
    int c = getchar();
    There we go. An example.

  5. #5
    Registered User
    Join Date
    Oct 2001
    Posts
    2,129
    Quote Originally Posted by MacGyver View Post
    Code:
    int c = getchar();
    not in C.
    Code:
    int c;
    c = getchar();

  6. #6
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,788
    Quote Originally Posted by robwhit View Post
    not in C.
    Code:
    int c;
    c = getchar();
    And why not?
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    – David J. Wheeler

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Updating in a sequential file?
    By Ronnyv1 in forum C Programming
    Replies: 1
    Last Post: 03-24-2009, 04:41 PM
  2. Database assignment is Killing me!
    By Boltrig in forum C Programming
    Replies: 2
    Last Post: 11-29-2007, 03:56 AM
  3. LinkList Sorting in C
    By simly01 in forum C Programming
    Replies: 3
    Last Post: 11-25-2002, 01:21 PM
  4. Creating a student grade book-how?
    By Hopelessly confused in forum C Programming
    Replies: 5
    Last Post: 10-03-2002, 08:43 PM
  5. A few tips please...
    By gems in forum C++ Programming
    Replies: 4
    Last Post: 04-11-2002, 02:28 PM