What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal
RebornBuddy Forums

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

C++ help

Ama

New Member
Joined
Jun 6, 2011
Messages
1,171
This is my first project for one of my classes this semester and I cant figure out how to do a freaking header file. Anyone have a hint on what Im doing wrong?

When i try to compile calculator.cpp, I get a compiler error saying "undefined reference to myAdd(double, double) " and all the other operations

calculator.cpp
operations.cpp
operations.h

also does anyone know how to upload to an ssh server with tortoisesvn? I typed "svn+ssh://usrname@address" but I couldn't get it to authenticate. Does it matter if it is a linux server?
 
Last edited:
As for your c++ app, then you need a header file for every .cpp file, where you define which variables and functions are able to be used in the .cpp file. (e.g. you need to have a .h file with the following stuff - taken from your calculatero.cpp:

// Function Prototypesdouble readOperand(const char *name);int readOperation();void printMenu();double doOperation(int doMath);void printResult(double result);bool validOperation(int o);).
 
fixed...

needed to compile calculator.cpp and operations.cpp at the same time. :)
 
Back
Top