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

    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:


    The header file he gave us:


    My current "scratch code":


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


    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
    Phildelphia, PA
    Whoa, you can have more than one main() function. int main() belongs in your .cpp file.

    "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
    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, 06:20 AM
  2. Need help with my program...
    By Noah in forum C Programming
    Replies: 2
    Last Post: 03-11-2006, 07:49 PM
  3. I need some help with my program please.
    By agentxx04 in forum C Programming
    Replies: 9
    Last Post: 09-26-2004, 08:51 AM
  4. Replies: 2
    Last Post: 05-10-2002, 05:16 PM
  5. My program, anyhelp
    By @licomb in forum C Programming
    Replies: 14
    Last Post: 08-14-2001, 11:04 PM

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