Sign in to follow this  
raptorstrike

reasigning const char*

Recommended Posts

raptorstrike    181
ok im reasigning a const char* like so Enemy_List_C = Enemy_List[One->Enemy_Vector[i]->ID].c_str(); this is in a for loop were i differs and there for so dose the ID# can i do this? because Enemy_list_C is a const char*

Share this post


Link to post
Share on other sites
TheWanderer    194
Yes, you can. The only time the pointer would not be modifiable is if Enemy_List_C was a char *const. In this case, you would not be able to change the value of the pointer.

EDIT: spelling

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this