+ 1

CodeBlocks "no such file or directory"

can someone help me with the tutorials on constructors and destructors in c++ course, i do everything as shown in the tutorials but i get "no such file or directory" errors in CodeBlocks

16th Jul 2022, 7:19 PM
Кавун 🍉
Кавун 🍉 - avatar
8 odpowiedzi
+ 2
I solved the problem !!! To avoid such an error, the first thing after creating a new project in Code Blocks you need to compile the program "Hello World!", which is written by default in each new project. The fact is that if this is not done, it will not exist .exe file in Debug and Release folders.
17th Jul 2022, 11:14 AM
Кавун 🍉
Кавун 🍉 - avatar
+ 1
Attempt? can you Show it?
16th Jul 2022, 7:40 PM
Felix Alcor
Felix Alcor - avatar
0
Are you using #include of a header file that is not available on their system?
16th Jul 2022, 10:34 PM
Brian
Brian - avatar
0
it makes no sense to show the code, I rewrote it 2 times exactly as shown in the lessons
17th Jul 2022, 6:22 AM
Кавун 🍉
Кавун 🍉 - avatar
0
Of course I included the header file, here the problem is in the code blocks I think. I press file -> new -> class.
17th Jul 2022, 6:23 AM
Кавун 🍉
Кавун 🍉 - avatar
0
Maybe CodeBlocks is configured to use a nonexistent project folder where it attempts to create the new class file. Maybe the folder exists, but you don't have privilege to write to it. Try running CodeBlocks as Administrator, but only if you are certain that would be safe to try. (Did your copy of CodeBlocks come from a reputable source?)
17th Jul 2022, 7:17 AM
Brian
Brian - avatar
0
the fact is that I did not do it from my home computer, maybe you are right, but I installed the block code clean from the official site. for some reason does not associate the class header file with the project. ok, I think I can figure it out later.
17th Jul 2022, 8:25 AM
Кавун 🍉
Кавун 🍉 - avatar
0
Can you please then tell me how the original class file would work for me? (having the .cpp extension). why it does not need to be included in main.cpp for the program to work
17th Jul 2022, 8:27 AM
Кавун 🍉
Кавун 🍉 - avatar