Having trouble with program

This is a discussion on Having trouble with program within the C++ Programming forums, part of the General Programming Boards category; Hi, I am new to this group and would first like to say hello to everyone. I am having some ...

  1. #1
    Registered User
    Join Date
    Oct 2003
    Posts
    2

    Having trouble with program

    Hi, I am new to this group and would first like to say hello to everyone. I am having some major problems getting on track for a school project and I am at my wits end. I think the teacher goes out of his way to make our lives difficult. Basically I am just looking for some help here, some direction, maybe even some example code. I pretty much know what I need to do, but I am having alot of trouble translating it to code. Below are some links to the project specs and some very raw, very basic, and probabaly very wrong "scratch code" i am working on. If anyone can give me any help at all it would be GREATLY appreciated. Thanx for reading!

    This is the proj spex:

    http://users.adelphia.net/~cjr1976/D...Structures.htm

    The header file he gave us:

    http://users.adelphia.net/~cjr1976/map.h

    My current "scratch code":

    http://users.adelphia.net/~cjr1976/map.cc
    http://users.adelphia.net/~cjr1976/main.cc

    These 2 links are for an example input file and an example output using the file:

    http://users.adelphia.net/~cjr1976/map1.dat
    http://users.adelphia.net/~cjr1976/map1.out

    We are using Pico in Unix to edit and G++ to compile if that helps in any way.

    Again I would like to thank anyone in advance that tries to help.

  2. #2
    Senior Member joshdick's Avatar
    Join Date
    Nov 2002
    Location
    Phildelphia, PA
    Posts
    1,146
    Whoa, you can have more than one main() function. int main() belongs in your .cpp file.
    FAQ

    "The computer programmer is a creator of universes for which he alone is responsible. Universes of virtually unlimited complexity can be created in the form of computer programs." -- Joseph Weizenbaum.

    "If you cannot grok the overall structure of a program while taking a shower, you are not ready to code it." -- Richard Pattis.

  3. #3
    Registered User
    Join Date
    Oct 2003
    Posts
    2
    Ya I know, like I said it is rough, I was mainly just coding and testing certain things, and was going to break up into functions later. But i am not even sure if I am heading in the right direction, what functions should contain what operations, and how to bring it all together. I am working on breaking it down now, just wanted to get some things working before I introduce more problems Thanx!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Having a bit of trouble with a binary search program
    By d-dub in forum C++ Programming
    Replies: 2
    Last Post: 04-11-2006, 05:20 AM
  2. Need help with my program...
    By Noah in forum C Programming
    Replies: 2
    Last Post: 03-11-2006, 06:49 PM
  3. I need some help with my program please.
    By agentxx04 in forum C Programming
    Replies: 9
    Last Post: 09-26-2004, 07:51 AM
  4. Replies: 2
    Last Post: 05-10-2002, 04:16 PM
  5. My program, anyhelp
    By @licomb in forum C Programming
    Replies: 14
    Last Post: 08-14-2001, 10:04 PM

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