当前位置: 技术问答>linux和unix
Fedora Core 3 下gdb调试问题
来源: 互联网 发布时间:2015-11-13
本文导语: test.c源程序如下: #include void my_print(char *string); void my_print2(char *string); main() { char my_string[] = "hello there"; my_print(my_string); my_print2(my_string); } void my_print(char* string) { printf("The string is %sn", string); } void my_p...
test.c源程序如下:
#include
void my_print(char *string);
void my_print2(char *string);
main()
{
char my_string[] = "hello there";
my_print(my_string);
my_print2(my_string);
}
void my_print(char* string)
{
printf("The string is %sn", string);
}
void my_print2(char* string)
{
char * string2;
int size, i;
size = strlen(string);
string2 = (char*)malloc(size+1);
for(i = 0; i
#include
void my_print(char *string);
void my_print2(char *string);
main()
{
char my_string[] = "hello there";
my_print(my_string);
my_print2(my_string);
}
void my_print(char* string)
{
printf("The string is %sn", string);
}
void my_print2(char* string)
{
char * string2;
int size, i;
size = strlen(string);
string2 = (char*)malloc(size+1);
for(i = 0; i