2021年1月6日星期三

C++ I keep getting the C3861 code when trying to run my function

I am just starting out in learning C++ and using W3Schools to learn how. Using the provided link to learn how to create functions. When I run the code it gives me the error 'C3861 - identifier not found' on the line I mention the function.

1    #include <iostream>       using namespace std;         int main() {  5        myFunction();       }         void myFunction() {            cout << "Hello World!";  10   }    

On line 5 is where the error gets thrown. Why do I get the error? How can I properly declare a function?

https://stackoverflow.com/questions/65605339/c-i-keep-getting-the-c3861-code-when-trying-to-run-my-function January 07, 2021 at 09:05AM

没有评论:

发表评论