In C this works:
char buffer[80],*ptr;
/* buffer contains "abc123" */
*ptr = &buffer[0];
*ptr++;
Aurora does not like '*ptr++".
How would I do this?
Well it depends on what your trying to do. If your reading the buffer and then incrementing the pointer then you need two statements.
chr = *ptr;
ptr++;
I am trying to move to the next char position in the buffer.
I am doing *ptr++ should it be ptr++ with no *?
Yes. *ptr dereferences the pointer and returns a character.
ptr++; increments the pointer
This is the code I am trying to make work:
InternetReadFile(hhttp,buffer,254,br);
buffer = left$(buffer,br);
IF(br) {
ptr = buffer;
ptr++;
while(*ptr != '"' && *ptr != null)
ptr++;
if(*ptr == ',')
ptr++;
cst = *ptr;
while(*ptr != ',' && *ptr != null)
ptr++;
ptr = null;
ptr++;
m_lstprc = USING("#######.##&",cst);
hstmt_update = NULL;
hstmt_update = m_db.PrepareSQL("UPDATE stock SET lstprc=? WHERE id="+NumToStr(m_id));
m_db.BindParameter(hstmt_update,1,m_lstprc,TYPE_double,8);
m_db.Execute(hstmt_update);
m_db.FreeSQL(hstmt_update);
messagebox(0, buffer,"Quote");
}
I have tried many combinations of * and no * still not working.
You've got a mix of C and Aurora there.
&& in C is AND in Aurora
== in C is = in Aurora
Fix those problems first.
Use a string type and get rid of the pointers if you wish. Remember in Aurora a string can be accessed like an array directly.
dstring buffer[80];
...
int ptr =1;
while((buffer[ptr] != '"') AND (buffer[ptr] != null))
ptr++;
if(buffer[ptr] = ',')
ptr++;
Or forge ahead with pointers and see how much you can learn.