error in placing classes in separate files.I am trying to place classes in separate files but i got following errors.please give me solution for this.

0 sachin shukla · October 26, 2014
/images/forum/upload/2014-10-26/8b26cdbe2df1f7e7cf0ddcc9a23f01fc.jpg/images/forum/upload/2014-10-26/7c8063e10a03a847f029cc1b769826c2.jpg/images/forum/upload/2014-10-26/8e89e1aa0cc38d293e08b5e71ef4c42c.jpg

Post a Reply

Replies

Oldest  Newest  Rating
0 John Shaw · November 1, 2014
Hi,

I had a similar problem, my solution was to include in the 'main.cpp'
the files Cod-Blocks couldn't find.

So

try including

#include "sachin.cpp"

along with your header file.

Also make sure your 'sachin.cpp' has

#include <iostream>
#include "Sachin.h"
using namespace std;

Hope this helps.
0 Michał Pilszak · October 29, 2014
I had similar problems. The issue was that Copiler looked into wrong directory. Instead of looking into MyProject (which is the name of my project) it looked into subdirectory "Sources". To change this I needed to:
1. Right click on my project icon (MyProject)
2. Select Build options...
3. Select tab "Search directories"
4. Select the only path existing below (it was Sources before)
5. Select Edit
6. Change it so, Compiler will look for files in whole Project (MyProject)
0 sachin shukla · October 28, 2014
thanks
  • 1

C++

107,273 followers
About

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

Links
Moderators
Bucky Roberts Administrator