is this statement legal??

This is a discussion on is this statement legal?? within the C++ Programming forums, part of the General Programming Boards category; cin.get(obj[i].task_descrip,50,'\n'); cin.ignore(100,'\n'); obj is an object for a strucutre, containing the member task_descrip....

  1. #1
    Unregistered
    Guest

    Arrow is this statement legal??

    cin.get(obj[i].task_descrip,50,'\n');
    cin.ignore(100,'\n');

    obj is an object for a strucutre, containing the member task_descrip.

  2. #2
    Unregistered
    Guest
    by the way this is in a function

    void add_task(task *obj)

  3. #3
    Registered User dirkduck's Avatar
    Join Date
    Aug 2001
    Posts
    428
    erm...why not try it out yourself?

  4. #4
    the hat of redundancy hat nvoigt's Avatar
    Join Date
    Aug 2001
    Location
    Hannover, Germany
    Posts
    3,139
    >is this statement legal??

    You might want to ask your lawyer if there are any laws preventing you from using the . operator on a pointer.
    You should have no problems if you are living in a free country.
    However, your compiler will not accept it.
    hth
    -nv

    She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."

    When in doubt, read the FAQ.
    Then ask a smart question.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Usefulness of the "else if" statement
    By gn17 in forum C Programming
    Replies: 7
    Last Post: 08-12-2007, 05:19 AM
  2. Meaning of this statement?
    By @nthony in forum C Programming
    Replies: 7
    Last Post: 07-16-2006, 02:57 AM
  3. If Else statement problem
    By doofusboy in forum C Programming
    Replies: 2
    Last Post: 11-09-2005, 06:18 AM
  4. string & if statement
    By Curacao in forum C++ Programming
    Replies: 4
    Last Post: 05-02-2003, 09:56 PM
  5. Uh-oh! I am having a major switch problem!
    By goodn in forum C Programming
    Replies: 4
    Last Post: 11-01-2001, 03:49 PM

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