![]() ![]() Hello function (hello.cpp): #include"hello.h" Using std::cout using std::endl using std::cin cpp file but gives the same error "run c/c file". I tried the same thing with a simple "Hello world!" program where it works fine if everything is in one. The undefined reference error is always the first function from a header the main program would have to use. cpp files with corresponding headers (all in the same folder) and trying to "run c/c file" through the button in the top right, it gives the error "'.\program.exe' does not exist" (with the option to open 'launch.json') and says "undefined reference to '.'. ![]() cpp file.Īfter seperating the functions into three. It involves a program containing several functions and works fine as long es everything is in one. I am currently using Visual Studio Code to learn c using the book "accelerated c ", on chapter 4.
0 Comments
Leave a Reply. |