Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in C only
Search
Advanced Search
Forums
Product Launch
Updates
Today's Posts
Member List
Calendar
Home
Forum
Topic
C
how to convert a 'const char *' to 'char *' in vc++
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
jsl
New Member
Join Date:
May 2007
Posts:
7
#1
how to convert a 'const char *' to 'char *' in vc++
May 2 '07, 10:30 AM
how to convert a 'const char *' to 'char *' in vc++
svlsr2000
Recognized Expert
New Member
Join Date:
Feb 2007
Posts:
181
#2
May 2 '07, 11:14 AM
You can use casting operators to do so.
Comment
Post
Cancel
xoinki
New Member
Join Date:
Apr 2007
Posts:
110
#3
May 2 '07, 11:32 AM
const char *ask = "so easy";
char *temp = NULL;
temp = (char *)ask;
try this..
Xoinki
Comment
Post
Cancel
Banfa
Recognized Expert
Expert
Join Date:
Feb 2006
Posts:
9067
#4
May 2 '07, 08:35 PM
But if it const for a good reason then you will need to create a buffer of your own and copy it there.
Comment
Post
Cancel
jsl
New Member
Join Date:
May 2007
Posts:
7
#5
May 3 '07, 12:55 PM
Originally posted by
xoinki
const char *ask = "so easy";
char *temp = NULL;
temp = (char *)ask;
try this..
Xoinki
thank you Xoinki, it has solved my problem
Comment
Post
Cancel
Previous
template
Next
Working...
Yes
No
OK
OK
Cancel
👍
👎
☕
Comment