Cross Stitching Simulation Problem

This is a discussion on Cross Stitching Simulation Problem within the C Programming forums, part of the General Programming Boards category; Hi people, I was wondering if anyone can kindly advise me on how to go about approaching the following problem ...

  1. #1
    Registered User
    Join Date
    Oct 2005
    Posts
    1

    Cross Stitching Simulation Problem

    Hi people, I was wondering if anyone can kindly advise me on how to go about approaching the following problem : http://www.comp.nus.edu.sg/~cs1101cl/lab4/oddweek/ .

    A few tips to help me get started would be nice :
    -How do I read in values from an external data file such that I terminate when I first come across a '6'? The problem arises as I cannot blindly read in values without giving due consideration to the number of values in a given line(which is not consistent to begin with) until I come across the first '6'.

  2. #2
    Fear the Reaper...
    Join Date
    Aug 2005
    Location
    Toronto, Ontario, Canada
    Posts
    625
    What are your specific questions ? What are you particularly having trouble with ? I don't want to have to read the entire assignment...
    Teacher: "You connect with Internet Explorer, but what is your browser? You know, Yahoo, Webcrawler...?" It's great to see the educational system moving in the right direction

  3. #3
    Registered User cbastard's Avatar
    Join Date
    Jul 2005
    Location
    India
    Posts
    167
    >>How do I read in values from an external data file such that I terminate when I first come across a '6'?
    The loop in which you switch the canvas.read every line with fgets and check the first character of buffer with '6',if it is then put a break;.
    Long time no C. I need to learn the language again.
    Help a man when he is in trouble and he will remember you when he is in trouble again.
    You learn in life when you lose.
    Complex problems have simple, easy to understand wrong answers.
    "A ship in the harbour is safe, but that's not what ships are built
    for"

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Someone having same problem with Code Block?
    By ofayto in forum C++ Programming
    Replies: 1
    Last Post: 07-12-2007, 09:38 AM
  2. A question related to strcmp
    By meili100 in forum C++ Programming
    Replies: 6
    Last Post: 07-07-2007, 03:51 PM
  3. WS_POPUP, continuation of old problem
    By blurrymadness in forum Windows Programming
    Replies: 1
    Last Post: 04-20-2007, 07:54 PM
  4. wxWidgets cross platform GUI problem
    By BobS0327 in forum Linux Programming
    Replies: 2
    Last Post: 05-31-2006, 07:34 AM
  5. Laptop Problem
    By Boomba in forum Tech Board
    Replies: 1
    Last Post: 03-07-2006, 06:24 PM

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