Try this:
if ( primeNumber(x) )
instead of
if ( primeNumber )
And change your return statement like
return x == 2 || x == 3 || x == 5 || x == 7;
if you want to compare the value.
More Related Contents:
- C++ : Unable to read from large txt file [closed]
- “does not name a type” error c++ [duplicate]
- How to optimize traversing a range of numbers?
- Can I call a constructor from another constructor (do constructor chaining) in C++?
- Why aren’t my include guards preventing recursive inclusion and multiple symbol definitions?
- Reading a password from std::cin
- Initialization Order of Class Data Members
- Global memory management in C++ in stack or heap?
- Unresolved external symbol in object files
- Finding all the subsets of a set
- Creating an input stream from constant memory
- Is there any “standard” htonl-like function for 64 bits integers in C++?
- Sleep function in C++
- How to create NVIDIA OpenCL project
- C++ Winsock P2P
- Why don’t the C or C++ standards explicitly define char as signed or unsigned?
- What do each memory_order mean?
- How to read a growing text file in C++?
- 5 years later, is there something better than the “Fastest Possible C++ Delegates”?
- When should you use the “this” keyword in C++? [duplicate]
- how to test a string for letters only
- Error with address of parenthesized member function
- Using bts assembly instruction with gcc compiler
- Why sizeof int is wrong, while sizeof(int) is right?
- Add Library to Visual Studio 2008 C++ Project
- Does C have One Definition Rule like C++?
- Why does pointer to int convert to void* but pointer to function convert to bool?
- Configuring Vim for C++
- Why do some people prefer “T const&” over “const T&”?
- c++11 Thread class how to use a class member function