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

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chakrod swapna
    New Member
    • Nov 2013
    • 1

    #1

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

    hiiiiiii ,
    im trying to write c code for imagedisplay,an d at the basic stages i get struct of problem
    ' error: unknown type name ‘AnsiStrin g’
    '
    plsssss help me......

    my code is here:

    Code:
    int handle;
    
    struct stat statbuf;
    	 /* get information about the file */
    	 stat("C:\\image.jpg", &statbuf);
    	 /* display the information returned */
    	 //printf(statbuf.st_size);
    	 unsigned char *mem;
    	 if ((mem =(char *)malloc(statbuf.st_size)) == NULL)    
                  printf("problem alloc");
    	 
    	 if ((handle = open("image.jpg", "rb")) == -1) 
               printf("problem open file");
    	 read(handle, mem, statbuf.st_size);
                  printf("hiii");
    	 AnsiString ss;
    	 ss = *mem;
    	 Memo1->Text=ss;
             free(mem);
    Last edited by Rabbit; Nov 7 '13, 06:37 PM.
  • donbock
    Recognized Expert Top Contributor
    • Mar 2008
    • 2427

    #2
    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 ".

    Comment

    Working...