By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,009 Members | 1,643 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,009 IT Pros & Developers. It's quick & easy.

cannot convert int to const char*

P: 1
i am passing an char ** argument and returning its value as int
i am getting an error in doing that as cannot convert int to const char*
what can i do?
Aug 7 '07 #1
Share this Question
Share on Google+
2 Replies


Meetee
Expert Mod 100+
P: 931
i am passing an char ** argument and returning its value as int
i am getting an error in doing that as cannot convert int to const char*
what can i do?
Hi,
Can you paste your code here?
Aug 7 '07 #2

P: 6
i am writing code segment for that, you realise it ok


fun(char *p) {
int i;
unsigned int n;
for( ; *p != '\0'; p++)
n = n * 10 + (*p - '0');
-------------------------------

--------------------

}

then reverse rhe value n, u will get it
Aug 7 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Browse more C / C++ Questions on Bytes