Add this line before main function:
void swapCase (char* name);
int main()
{
...
swapCase(name); // swapCase prototype should be known at this point
...
}
This is called forward declaration: compiler needs to know function prototype when function call is compiled.
Related Contents:
- Resolve build errors due to circular dependency amongst classes
- What is an ‘undeclared identifier’ error and how do I fix it?
- “Undefined reference to” template class constructor [duplicate]
- c++ multiple definitions of a variable
- Why vector::reference doesn’t return reference to bool?
- problem sorting using member function as comparator
- Why is this program erroneously rejected by three C++ compilers?
- Can’t set value of static object field (error LNK2001: unresolved external symbol)
- How do I concatenate multiple C++ strings on one line?
- c++ compile error: ISO C++ forbids comparison between pointer and integer
- Template issue causes linker error (C++) [duplicate]
- Detecting the parameter types in a Spirit semantic action
- StdAfx + Header file – Order of inclusion in MFC application
- invalid conversion from ‘const char*’ to ‘char’
- C++ mutex in namespace std does not name a type
- Public operator new, private operator delete: getting C2248 “can not access private member” when using new
- Initializing container of unique_ptrs from initializer list fails with GCC 4.7
- C++ copy a stream object
- Why can’t “transform(s.begin(),s.end(),s.begin(),tolower)” be complied successfully?
- extra qualification error in C++
- How can you compare two character strings statically at compile time
- Why statements cannot appear at namespace scope?
- error::make_unique is not a member of ‘std’
- cc1plus: error: unrecognized command line option “-std=c++11” with g++
- error: Class has not been declared despite header inclusion, and the code compiling fine elsewhere
- How do you get assembler output from C/C++ source in gcc?
- C99 stdint.h header and MS Visual Studio
- Passing variable arguments to another function that accepts a variable argument list
- How to perform a bitwise operation on floating point numbers
- Use OpenSSL RSA key with .Net
- Mixing cout and wcout in same program
- Why do const references extend the lifetime of rvalues?
- Static Data Member Initialization
- Building glew on windows with mingw
- C++: Redirecting STDOUT
- Why is a boolean 1 byte and not 1 bit of size?
- SSE integer division?
- Undefined reference to vtable. Trying to compile a Qt project
- Why shared_from_this can’t be used in constructor from technical standpoint?
- What is the difference between “new” and “malloc” and “calloc” in C++? [duplicate]
- Receiving Chunked HTTP Data With Winsock
- Call main() itself in c++?
- Get home directory in Linux
- How to parse date/time from string?
- Is main() overloaded in C++?
- Why does a C/C++ compiler need know the size of an array at compile time?
- dynamic_cast from “void *”
- Somehow register my classes in a list
- Are there binary memory streams in C++
- using extern template (C++11) to avoid instantiation