Thread: Any ideas how to start??

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    You must start easy. Start with building one class, make sure it works, then move forward with the next.
    For your parking question, I'd suggest a class for it. It should contain all the info that is required for reserving a parking space, and of course, a flag that says if it's reserved or not. You can keep all these classes (120 of them) inside a vector and just look through that vector on your parking places and see if there's one free. It's not the most efficient method, but it's probably the easiest.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    I don't know who wrote it, but I think it may have been iMalc - either way: Start by using the simplest method that solves the problem. So a linear search through an array should be a starting point here - doing more complex searches or more complex storage options is probably overkill to solve this problem in general. After all, 120 items in any form of array storage is pretty small in modern systems terms.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Project ideas.
    By Wraithan in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 04-25-2009, 03:29 PM
  2. start another program
    By lshome in forum C Programming
    Replies: 3
    Last Post: 06-24-2002, 01:48 PM
  3. Need some help with a basic tic tac toe game
    By darkshadow in forum C Programming
    Replies: 1
    Last Post: 05-12-2002, 04:21 PM
  4. Where is a good place to start?!
    By bobthefish3 in forum Game Programming
    Replies: 1
    Last Post: 10-09-2001, 11:28 AM