cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
UNIX/Linux Programming
having problem while copieing function r
having problem while copieing function returned char array to a char array using strcpy
Mar 21, 2013 at 9:07am UTC
Walley
(1)
char *getIcType(Ic ic){
static char icType[5];
switch(ic.type){
//some code
}
return(icType);
}
In main
{
char icType[5];
//some code
strcpy(icType,getIcType(ic));
}
Its compiling , while running the code its showing some memory fault error
Topic archived. No new replies allowed.