why cant we use strcat without initialing first parameter?
e.g.
char *b = "a";
char *a;
strcat(a,b);
savinki
0
Light Poster
Recommended Answers
Jump to PostMSDN says about strcat:
char *strcat( char *strDestination, const char *strSource );
Parameters
strDestination
Null-terminated destination stringstrSource
Null-terminated source stringIn your case pointer a is unitialized and does not point to null-terminated string.
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.