![]() |
|
#1
|
|||
|
|||
Function program: getting "error C2064:"Hello,
I keep getting this error for this program which is simply suppose to tell me if a letter is a vowel or not. error C2064: term does not evaluate to a function taking 1 arguments Here is the code: CPP / C++ / C Code:
Last edited by admin II : 09-May-2008 at 04:38.
Reason: Please surround your C++ code with [cpp] your code [/cpp]
|
|
#2
|
||||
|
||||
Re: Function program: getting "error C2064:"There is a local (unused) variable also named 'isVowel'. The local variable name will take precedence, and locally, that name (or symbol) is not a function.
__________________
Use the force...read the source!! WYCIWYG -- what you code is what you get! |
|
#3
|
|||
|
|||
Re: Function program: getting "error C2064:"Hello
thanks I fixed the problem... and now the program runs, but it says that everything is a vowel.... I tried playing around with it. and this is the code that works best, but still not correctly: CPP / C++ / C Code:
Last edited by admin II : 09-May-2008 at 04:38.
Reason: Please surround your C++ code with [cpp] your code [/cpp]
|
|
#4
|
|||
|
|||
Re: Function program: getting "error C2064:"Quote:
this statement any way: letterval = isVowel (letter); even if u r equired to use a return value function; CPP / C++ / C Code:
|
|
#5
|
|||
|
|||
Re: Function program: getting "error C2064:"Quote:
Hey, Thanks, I do need it to be a value-returning function. Is the example that you posted a value-returning function?? i added the: letterval = isVowel (letter); statement because that is how i learned to use the functions. |
|
#6
|
|||
|
|||
Re: Function program: getting "error C2064:"all u need to di is change the void function to return value function i will post it gimme about 10 min
|
|
#7
|
|||
|
|||
Re: Function program: getting "error C2064:"functions are two types void which can return more than one value and return functions which can return only one value so i used a void but i will post the same solution with a return type function and u can see the difference
|
|
#8
|
|||
|
|||
Re: Function program: getting "error C2064:"ry this and tell me about it
CPP / C++ / C Code:
|
|
#9
|
||||
|
||||
Re: Function program: getting "error C2064:"The switch is working against you, as there is no 'default' case so the 'return 1' is always given. Try the switch reworked like this:
CPP / C++ / C Code:
I would have probably coded the isVowel() function like this: CPP / C++ / C Code:
__________________
Use the force...read the source!! WYCIWYG -- what you code is what you get! |
|
#10
|
|||
|
|||
Re: Function program: getting "error C2064:"this is how i coded it at the begining but i replied to lilballeer cuz he needs a return value function.
also i need to know what u mean by the switch is working against me cuz i did that function kinda in a hurry so i forget about the break statement and this the original code CPP / C++ / C Code:
|
Recent GIDBlog
Toyota - 2008 August Promotion by Nihal
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| run script command on ns2.26 | newbie06 | Computer Software Forum - Linux | 53 | 23-May-2008 23:36 |
| Airport Log program using 3D linked List : problem reading from file | batrsau | C Programming Language | 11 | 29-Feb-2008 07:44 |
| Flex and bison coding | lucky88star | C++ Forum | 5 | 24-Dec-2007 11:57 |
| Need Help with input files. | Efferus | C++ Forum | 2 | 24-Nov-2007 16:19 |
| [Include] Doubly-linked List | dsmith | C Programming Language | 6 | 14-Apr-2006 13:12 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The