473,388 Members | 944 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,388 software developers and data experts.

how to use append function

34
Expand|Select|Wrap|Line Numbers
  1.         EventLogEntryStruct EventLogEntry[100];
  2.         for(int i=1;;i++)
  3.         {
  4.             EventLogEntry[i].logName = "log-";
  5.             EventLogEntry[i].eventString = "event-";
  6.  
  7.  
  8.             EventLogEntry[i].bufPos = i;
  9.             EventLogEntry[i].logIdx = i+1;
  10.             logName.append(i);//= "log-";
  11.             EventLogEntry[i].dateTime = i+4;
  12.             EventLogEntry[i].systemTick = i;
  13.             EventLogEntry[i].resetCount = 1;
  14.             EventLogEntry[i].inAir = 1;
  15.             EventLogEntry[i].appSpec1 = i+2;
  16.             EventLogEntry[i].appSpec2 = i+3;
  17.             EventLogEntry[i].appSpec3 = i+1;
  18.             EventLogEntry[i].timeStampLSW = 12;
  19.             EventLogEntry[i].timeStampMSW = 24;
  20.             EventLogEntry[i].timeStamp = 22;
  21.             EventLogEntry[i].timeDelta = 12;
  22.             EventLogEntry[i].windowID = i+2;
  23.             eventString.append(i);// = "event-1";


here EventLogEntryStruct is a structure defined in my header file and i have created an instance of it as EventLogEntry. now i have to run an infinite loop as its a code in the server side which will be continuously sending data to the client ... now i want to change the logName and eventString everytime in the loop so what i did is at line no 4& 5 i ve declared it and used the append function at line no. 10 & 23 but its throwing error of:

[HTML]D:\trial\serverTrial.cpp(175) : error C2065: 'logName' : undeclared identifier
D:\trial\serverTrial.cpp(175) : error C2228: left of '.append' must have class/struct/union type
D:\trial\serverTrial.cpp(188) : error C2065: 'eventString' : undeclared identifier
D:\trial\serverTrial.cpp(188) : error C2228: left of '.append' must have class/struct/union type[/HTML]
so can any one plz help me ut in sorting this error..
Apr 15 '08 #1
2 2690
Banfa
9,065 Expert Mod 8TB
Expand|Select|Wrap|Line Numbers
  1.             logName.append(i);//= "log-";
  2.  
Shouldn't this be

Expand|Select|Wrap|Line Numbers
  1. EventLogEntry[i].logName.append(i);//= "log-";
Apr 15 '08 #2
pralu
34
Shouldn't this be

Expand|Select|Wrap|Line Numbers
  1. EventLogEntry[i].logName.append(i);//= "log-";

no it should not be... but i got it how to dooo

thnx ..
Apr 15 '08 #3

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

Similar topics

9
by: JMCN | last post by:
hi- i have inherited an access 97 database that keeps track of the loans. i have been running into referential intergrity problems when i try to append new loans to table. first of all is a...
3
by: JOEP | last post by:
What do I need to do to allow an append query to post null values to records in a field of the destination table? Basically I want to allow records with null values to post to the table. The append...
1
by: Access | last post by:
Here is my function to change a users permission level in the database. This relates to an Access database secured using Access security. This function is called if the end user changes a staff...
8
by: WordVBAProgrammer | last post by:
I've been struggling with this for a few days now. It worked originally as plain VB-type strings, but for some reason ceased creating the FileNm. I changed the code to use StringBuilder, but...
3
by: barry | last post by:
I have the following: function(NAMED) { sString.Append("document.forms.NAMED.style.visibility = 'hidden'") } and would like to convert the NAMED into the object it represents - for example in...
5
by: solar | last post by:
I have copied a function that appends from table orders2 into table orders1 the row that has the value SubOrder = True in the table orders2. This function finds the highest ordered in the table...
2
by: jeremito | last post by:
I have created a class that inherits from the list object. I want to override the append function to allow my class to append several copies at the same time with one function call. I want to do...
10
by: HYRY | last post by:
I have the following questions, I am using Python 2.4.2 19167152 #1 11306608 #1 1. the address of a.append and list.append is different, can I get the address of...
10
by: pythonnoob | last post by:
Hello everyone. New to python as well as this forum, but i must say ive learned a but already reading through some posts. Seems to be a pretty helpful community here. Before i post a question...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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.