Click here to Skip to main content
16,005,178 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: c:\Users\Public, but I don't know how to get that path programatically Pin
Nishad S6-Oct-08 20:55
Nishad S6-Oct-08 20:55 
AnswerRe: c:\Users\Public, but I don't know how to get that path programatically Pin
Naveen6-Oct-08 21:28
Naveen6-Oct-08 21:28 
Questioncall OnKillFoucus event of Edit box.............. Pin
ani_ikram6-Oct-08 20:16
ani_ikram6-Oct-08 20:16 
AnswerRe: call OnKillFoucus event of Edit box.............. Pin
_AnsHUMAN_ 6-Oct-08 20:22
_AnsHUMAN_ 6-Oct-08 20:22 
AnswerRe: call OnKillFoucus event of Edit box.............. Pin
Nishad S6-Oct-08 20:25
Nishad S6-Oct-08 20:25 
AnswerRe: call OnKillFoucus event of Edit box.............. Pin
Hamid_RT7-Oct-08 5:10
Hamid_RT7-Oct-08 5:10 
AnswerRe: call OnKillFoucus event of Edit box.............. Pin
Sandeep Saini SRE7-Oct-08 20:45
Sandeep Saini SRE7-Oct-08 20:45 
QuestionSSCANF problem. Pin
Cbadboy6-Oct-08 18:59
Cbadboy6-Oct-08 18:59 
i am having problem with sscanf being how I say o.O

line exactly

<br />
"spawn = 1648\t3409\t3536\t0\t3410\t3557\t3408\t3535\t2\tCow"<br />

the code I use

struct Pos {
	int x;
	int y;
};


int npcId = 0;
Pos coords;
int heightLevel = 0;
Pos moveRange1;
Pos moveRange2;
int direction;


sscanf(line,"spawn%*[ ]=%*[ ]%d%*[\t]%d%*[\t]%d%*[\t]%d%*[\t]%d%*[\t]%d%*[\t]%d%*[\t]%d%*[\t]%d",&npcId, &coords.x, &coords.y, &heightLevel, &moveRange1.x, &moveRange1.y, &moveRange2.x, &moveRange2.y, &direction);


"spawn = 1648\t3409\t3536\t0\t3410\t3557\t3408\t3535\t2\tCow"
outputs =
npcId: 0 (has to be 1648) (wrong for no reason o.O)
coords.x: 3412
coords.y: 3536
heightLevel: 0
moveRange1.x: 0 (wrong for again no reason as the format pattern matches)
moveRange1.y: 3557
moveRange2.x: 3408
moveRange2.y: 3535
direction: 2
the last \tCow is to be ignored its not really needed.

So whats wrong really Sigh | :sigh:
AnswerRe: SSCANF problem. Pin
Nishad S6-Oct-08 20:43
Nishad S6-Oct-08 20:43 
GeneralRe: SSCANF problem. Pin
Cbadboy6-Oct-08 21:12
Cbadboy6-Oct-08 21:12 
GeneralRe: SSCANF problem. Pin
Nishad S6-Oct-08 22:12
Nishad S6-Oct-08 22:12 
GeneralRe: SSCANF problem. Pin
Cbadboy7-Oct-08 14:11
Cbadboy7-Oct-08 14:11 
GeneralRe: SSCANF problem. Pin
Cbadboy7-Oct-08 18:00
Cbadboy7-Oct-08 18:00 
GeneralRe: SSCANF problem. Pin
David Crow10-Oct-08 4:01
David Crow10-Oct-08 4:01 
GeneralRe: SSCANF problem. Pin
Cbadboy10-Oct-08 10:28
Cbadboy10-Oct-08 10:28 
QuestionRe: SSCANF problem. Pin
David Crow10-Oct-08 10:41
David Crow10-Oct-08 10:41 
QuestionRe: SSCANF problem. Pin
David Crow10-Oct-08 10:38
David Crow10-Oct-08 10:38 
AnswerRe: SSCANF problem. Pin
Cbadboy12-Oct-08 9:03
Cbadboy12-Oct-08 9:03 
GeneralRe: SSCANF problem. Pin
David Crow12-Oct-08 13:49
David Crow12-Oct-08 13:49 
QuestionDyanic Array Pin
Nprog6-Oct-08 18:32
Nprog6-Oct-08 18:32 
AnswerRe: Dyanic Array Pin
Naveen6-Oct-08 19:19
Naveen6-Oct-08 19:19 
AnswerRe: Dyanic Array Pin
Nishad S6-Oct-08 20:28
Nishad S6-Oct-08 20:28 
AnswerRe: Dyanic Array Pin
Sarath C6-Oct-08 22:09
Sarath C6-Oct-08 22:09 
AnswerRe: Dyanic Array Pin
Hamid_RT7-Oct-08 5:08
Hamid_RT7-Oct-08 5:08 
QuestionWeb Browser Pin
Plasma Steel Games6-Oct-08 17:20
Plasma Steel Games6-Oct-08 17:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.