Bucky's C++ tutorial 42 - Cant figure out what I'm doing wrong!

0 Vikram Jayanthi · June 27, 2014
Can't figure out what's wrong with my code! Code below:main.cpp:#include #include "Vikram.h"using namespace std;int main(){ Vikram obj;obj.printstuff();}// the header fileVikram.h :#ifndef VIKRAM_H#define VIKRAM_Hclass Vikram{ public: Vikram();void printstuff();protected:private:};#endifVikram.cpp:#include#include "Vikram.h"using namespace std;Vikram::Vikram(){}void Vikram::printstuff(){cout<<"Why isn't this working??"<<endl;}The errors are undefined reference to Vikram:: Vikram()And undefined reference to Vikram::printstuff();

Post a Reply

Replies

Oldest  Newest  Rating
0 Daniel Collier · June 27, 2014
its probably the formatting....................
0 Mathias Frits Rørvik · June 27, 2014
Well don't create a new topic for the same issue...
  • 1

C++

107,224 followers
About

Used in many types of software including music players, video games, and many large scale applications.

Links
Moderators
Bucky Roberts Administrator