strcpy c function not work IOS C custom library for IOS7 -


i using c custom ios library. have upgraded xcode 5.0 developer preview. strcpy not work me crash app @ point. can explain me issue?

update

here code:

char global[] = " "; printf("error opening %s constants input\n", lang);  strcpy(global, lang);  

in printf lang working , strcpy not working.

when declare global as

char global[] = " "; 

it enough space two characters. space , string terminator. either set size big enough contain whole string try copy it, or make pointer , allocate dynamically (in case should not forget allocate space string terminator).


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -