473,398 Members | 2,088 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

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,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
1 1284
donbock
2,426 Expert 2GB
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

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

Similar topics

27
by: Sune | last post by:
Hi! Pre-requisites: ------------------- 1) Consider I'm about to write a quite large program. Say 500 K lines. 2) Part of this code will consist of 50 structs with, say, no more than at most...
1
by: Jignesh Desai | last post by:
There are essentially two ways that you can write code for an ASP.NET application. Inline code Style --------------------------------------------------------------- <html> <script...
88
by: Peter Olcott | last post by:
Cab you write code directly in the Common Intermediate language? I need to optimize a critical real-time function.
5
by: A. Farber | last post by:
Hello, I call readv() and writev() in several spots of a program which I run under Linux, OpenBSD and Cygwin. Since it always the same way (check the return value; then check errno and retry if...
7
by: vinthan | last post by:
hi, I am new to python. I have to write test cases in python. An application is open in the desk top ( application writen in .Net) I have to write code to get focuse the application and click on...
1
by: Peniel | last post by:
Please If any one of you know how to write code which will test the safe sequency i.e code that express Banker's algorithm The pseudocode is as folows  Step1: Let Work and Finish be vectors of...
8
by: mohammaditraders | last post by:
#include <iostream.h> #include <stdlib.h> #include <conio.h> #include <string.h> class Matrix { private : int numRows, numCols ; int elements ;
1
by: Kyle Pellum | last post by:
I am trying to write code to copy and paste a worksheet from one workbook to another. The thing I cannot figure out is how to reference the workbook to be copied because the name will be different...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.