this program i see in text book and i try to compile it but it does not work ,it does not except string ,i get error say that string not declared so what is the wrong i use gcc compiler
Rich (BB code):
#include <stdio.h>
#include<string.h>
int main( void )
{
string s[4] = {"hello", "help", "save me", "groan"};
char t[] = "help";
string p = s[3];
printf( "%4s?\n", s[0] );
printf( "%s! ", p );
printf( "%10s ", s[2] );
printf( "%i", t == s[1] );
printf( "%c!\n", s[0][0] );
}