| | |
sscanf warning
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Nov 2008
Posts: 78
Reputation:
Solved Threads: 1
I'm looking for some help resolving the following warning...
warning: format ‘%c’ expects type ‘char*’, but argument 6 has type ‘char (*)[128]’
essentially what happens is inBuf is a 'string' and I want mode, c, s and data to be what's in it.
'data' complains. Can someone help me fix it.
Thanks
drjay
warning: format ‘%c’ expects type ‘char*’, but argument 6 has type ‘char (*)[128]’
C++ Syntax (Toggle Plain Text)
char data [ BLOCK_SIZE ]; sscanf ( inBuf, "%c %c %c %c", &mode, &c, &s, &data );
essentially what happens is inBuf is a 'string' and I want mode, c, s and data to be what's in it.
'data' complains. Can someone help me fix it.
Thanks
drjay
•
•
Join Date: Nov 2007
Posts: 390
Reputation:
Solved Threads: 39
•
•
•
•
I'm looking for some help resolving the following warning...
warning: format ‘%c’ expects type ‘char*’, but argument 6 has type ‘char (*)[128]’
C++ Syntax (Toggle Plain Text)
char data [ BLOCK_SIZE ]; sscanf ( inBuf, "%c %c %c %c", &mode, &c, &s, &data );
essentially what happens is inBuf is a 'string' and I want mode, c, s and data to be what's in it.
'data' complains. Can someone help me fix it.
Thanks
drjay
Usage:
C++ Syntax (Toggle Plain Text)
//Header #include<string> //implementation string a, b, c, d; d = a + " " + b + " " + c + " ";
Last edited by skatamatic; Apr 24th, 2009 at 9:21 pm.
![]() |
Similar Threads
- Optimizing OpenGL (SwapBuffer being slow) (C)
- Help (C)
- File parsing going awry (C)
- How to understand this input/output code? (C)
- need a little help with standard deviation (C)
- error C2375: 'my_strdup' : redefinition; different linkage (C++)
- error in the program (C)
- C++ question on classes (C++)
- structures and functions woohoo! (C++)
Other Threads in the C++ Forum
- Previous Thread: question
- Next Thread: Reading data from another file difficulty
| Thread Tools | Search this Thread |
api array based binary c++ c/c++ calculator char char* class classes code coding compile console conversion count database delete deploy desktop developer directshow dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp iamthwee ifstream input int integer java lib linkedlist linker linux list loop looping loops map math matrix memory multiple news number numbertoword output parameter pointer problem program programming project python random read recursion recursive reference return rpg sorting string strings struct temperature template templates test text text-file tree unix url variable vector video visualstudio win32 windows winsock wordfrequency wxwidgets





