snbb000
سه شنبه 05 شهریور 1392, 14:52 عصر
سلام . ببخشید دو کد زیر جه تفاوتی باهم داره ؟ چون اولی اجرا نمیشه اما دومی چرا .
ممنون
#include <stdio.h>
#include <conio.h>
#include <string.h>
int main(int argc , char *argv[])
{
char *x[2] = {"hwllo","howare"};
printf("%s", *++x );
}
#include <stdio.h>
#include <conio.h>
#include <string.h>
int main(int argc , char *argv[])
{
char *x[2] = {"hwllo","howare"};
printf("%s", *++argv );
}
هردو آرایه ای از اشاره گر هاست اما اولی کامپایلر ارور lvalue required as increment operand رو میده و لی دومی رو نه . چرا ؟
ممنون
#include <stdio.h>
#include <conio.h>
#include <string.h>
int main(int argc , char *argv[])
{
char *x[2] = {"hwllo","howare"};
printf("%s", *++x );
}
#include <stdio.h>
#include <conio.h>
#include <string.h>
int main(int argc , char *argv[])
{
char *x[2] = {"hwllo","howare"};
printf("%s", *++argv );
}
هردو آرایه ای از اشاره گر هاست اما اولی کامپایلر ارور lvalue required as increment operand رو میده و لی دومی رو نه . چرا ؟