Click here to Skip to main content
15,891,607 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i have function that accept string from user

C++
int findAscii(char* n)
 
   {
 
    //function body here
}

and

C++
int findAscii(char *n)
 
{
 
//function body here
}


the question is does n have the same value in both functions ? (functions are equivalent ?)
Posted
Comments
Sergey Alexandrovich Kryukov 29-Oct-14 20:43pm    
The question simply makes no sense. It depends on the call, not the function. Besides, the code fragments are identical; you cannot have them in the same C file...
—SA
TheSniper105 29-Oct-14 23:17pm    
for sure i will not put them in same C file i only want to know if they are equal
what do you mean it depends on the call?

1 solution

the type of your argument is char* and the name is n. It does not matter where you put *, (char*)n or (char *)n is equivalent
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900