G
gk245
I have something like this:
#include <stdio.h>
main ()
{
struct line
{
char write[20];
char read[20];
struct line *next;
};
struct line n1;
n1.write= "concepts";
}
However, if i try to compile it, i get a compiler error saying that
"incompatible types in assignment". Whats strange is that if i set
write as an integer, i don't get such a error and it compiles. Does
something special need to be done with character strings and pointers?
Thanks.
#include <stdio.h>
main ()
{
struct line
{
char write[20];
char read[20];
struct line *next;
};
struct line n1;
n1.write= "concepts";
}
However, if i try to compile it, i get a compiler error saying that
"incompatible types in assignment". Whats strange is that if i set
write as an integer, i don't get such a error and it compiles. Does
something special need to be done with character strings and pointers?
Thanks.