C++ function question

Discussion in 'Software' started by quirk, Sep 15, 2006.

  1. quirk

    quirk Corporal

    This is a dumb question, brought to you by a dumb student. (yes there are both dumb questions and dumb people, I know from personal inexperience) I have a program written for my course that uses a simple function, no classes, structures, or Lists. I just reread the assignment and it said to put all function declarations in a header file and all function definitions in a separate source file. It does not say to use "member" functions as he states to use for classes, nor does there seem to be any purpose in using a class. I have been unable to break up these functions as requested, like I have done with classes. I have been unable to find any reference to it in either of the books I have or in on-line searches. Is there a way to do this?

    //f.h
    void someFunction();

    //f.cpp
    void someFunction()
    {
    do something;
    }

    //main.cpp
    {
    somefunction();
    }
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds