0

Problem implementing class

After creating a class my programm is unable to build No such file or directory: file/class.cpp -o obj/Debug/class.o No such file or directory: file/main.cpp -o obj/Debug/main.o i have a main.cpp, a class.cpp, a class.h file created and in the folder. i also include the header in the main file. What am I doing wrong?

10th Jun 2018, 2:05 PM
Sebastian Häußer
Sebastian Häußer - avatar
5 ответов
+ 2
We need to know which IDE/compiler you are using. *.o files are object files which links your files together, sounds like an issue with makefile. https://stackoverflow.com/questions/2186246/what-is-o-file
10th Jun 2018, 2:18 PM
Fermi
Fermi - avatar
+ 1
ok, i just did it all over again and it works. i might have made a wrong tick when creating the class or messed sth up with storing the file. anyways, thanks for the fast replies. awesome community here!
11th Jun 2018, 9:47 AM
Sebastian Häußer
Sebastian Häußer - avatar
0
have you included class.h in class.cpp ? and used #pragma once or include guards
10th Jun 2018, 2:15 PM
Max
Max - avatar
0
yes i included that. im using codblocks and just went by the instructions of the task :/ should i just change the datatypes from .o to .obj files manually??
10th Jun 2018, 2:32 PM
Sebastian Häußer
Sebastian Häußer - avatar
0
show the code
11th Jun 2018, 7:18 AM
Aveek Bhattacharyya
Aveek Bhattacharyya - avatar