By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,963 Members | 1,041 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,963 IT Pros & Developers. It's quick & easy.

im trying to write c code for imagedisplay,and at the basic stages i get struct of pr

P: 1
hiiiiiii ,
im trying to write c code for imagedisplay,and at the basic stages i get struct of problem
' error: unknown type name ‘AnsiString’
'
plsssss help me......

my code is here:

Expand|Select|Wrap|Line Numbers
  1. int handle;
  2.  
  3. struct stat statbuf;
  4.      /* get information about the file */
  5.      stat("C:\\image.jpg", &statbuf);
  6.      /* display the information returned */
  7.      //printf(statbuf.st_size);
  8.      unsigned char *mem;
  9.      if ((mem =(char *)malloc(statbuf.st_size)) == NULL)    
  10.               printf("problem alloc");
  11.  
  12.      if ((handle = open("image.jpg", "rb")) == -1) 
  13.            printf("problem open file");
  14.      read(handle, mem, statbuf.st_size);
  15.               printf("hiii");
  16.      AnsiString ss;
  17.      ss = *mem;
  18.      Memo1->Text=ss;
  19.          free(mem);
Nov 7 '13 #1
Share this Question
Share on Google+
1 Reply


Expert 100+
P: 2,396
Please enclose your source code in CODE tags (using the "[CODE/]" button). That shows line numbers, making it easier to refer to particular sections of your code.

The error message means that the compiler doesn't know what "AnsiString" is. Neither do I.
  • What do you expect the line "AnsiString ss" to do?
  • Where did you hear about "AnsiString"?
Perhaps all you have to do is #include the header that defines "AnsiString".
Nov 7 '13 #2

Post your reply

Sign in to post your reply or Sign up for a free account.