![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#21 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
I would choose the second. Note that you must have a main function to get to an executable, and you can't have more than one.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#22 |
|
Programmer
Join Date: Dec 2004
Posts: 34
Rep Power: 0
![]() |
That was exactly what I was thinking, how could a class have TWO MAIN functions.
Right now I am at work, I will try it tonight, tell u the result. Thanks again, Regards Mack1982 |
|
|
|
|
|
#23 | |
|
Caffeinated Neural Net
![]() Join Date: Jun 2005
Location: Dry west coast of Canada
Posts: 1,034
Rep Power: 5
![]() |
Quote:
Technically it could, since it would be classname::main(), not ::main(), but yeah- you get my point, I hope.
__________________
And once again, Probability proves itself willing to sneak into a back alley and service Drama as would a copper-piece harlot. - Vaarsuvius, Order of the Stick |
|
|
|
|
|
|
#24 |
|
Programmer
Join Date: Mar 2006
Location: Tennessee
Posts: 41
Rep Power: 0
![]() |
My C++ teacher told us to never include a .cpp file, only .h files.
|
|
|
|
|
|
#25 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Your teacher is correct. However, I don't see any advice here for including the source files -- merely adding them to the project.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#26 |
|
Programmer
Join Date: Mar 2006
Location: Tennessee
Posts: 41
Rep Power: 0
![]() |
Sorry, I misread Mack's post, thought he was trying to include both .cpp and .h
|
|
|
|
|
|
#27 |
|
Programmer
Join Date: Dec 2004
Posts: 34
Rep Power: 0
![]() |
yep tested it today and it worked,..
Thanks for the help guys,.. regards Mack1982 |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|