Hello to all,
I have a baffling problem with printf in Borland c++ v5.2 as follows:
If I use the command:
Printf(“ ”);
Before the condition :
If(b[loc[pn][0]][0] == loc[pn][0]){
….
}
My code works correctly, but if I delete it this error occurs:
“Threat stopped access violation at 0x403492 read of address … “
Have every one experienced a similar problem or could help me?
Search Result
Collapse
3 results in 0.0016 seconds.
Keywords
Members
Tags
-
baffling printf error in c++
-
Question about delimiters.
I'm using the printf function to display some textual information. It is possible that the string may contain different symbols such as $#%^&* somewhere within the text.
I know that to handle the % that I need to use a %% to make the string evaluate correctly.
for example:
will display as strin%gCode:printf "strin%%g";
My question is are there any other symbols that... -
giacomomarciani started a topic format ‘%X’ expects argument of type ‘unsigned int’, but argument 3 has type 'int *'in Cformat ‘%X’ expects argument of type ‘unsigned int’, but argument 3 has type 'int *'
I don't understand why the piece of code below returns me the error:
warning: format ‘%X’ expects argument of type ‘unsigned int’, but argument 3 has type ‘int *’ [-Wformat]
Code:int *v=malloc(10*sizeof(int)); int i; for(i=0;i<10;i++) v[i]=i; for(i=0;i<10;i++) printf("v[i]=%+2d &v[i]=%#.10X | * (v+i)=%+2d (v+i)=%#.10X\n",v[i],&v[i],*(v+i),(v+i));