0

I recently change Code:Block. But I don't know, when I compile, at line 1:

#define <stdio.h>
or
#define<cstdio>

I see an error:macro names must be identifier.
When I compiled on DevC++, I saw no error.

the second question I want to ask is, who have link or documents.etc.. that teach detail how to debug in Code:Block.( I googled but not found any document comppality with me). please share for me, please :)

thanks :)

2
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by sergent
1

You want to include <stdio.h>? #Define is completely different!
Define works like this

#define error 1
#ifdef error
#error "Error is defined"
#endif

But if you want to include something you have to use #include like this

#include <iostream>
#include <cstdlib>

2nd question:
Debugger is pretty straight forward, is the link I found on the google search. But if you don't know how #include works, I think you should practice with more basic stuff :D, I don't think you need debugger right now.

0

@sergent: Oh, sorry, sorry so much :( I know different between include and define.
I almost changed to Code::Block (before that, I use DevC++), so if something has wrong, I blamed it for my IDE, not think why it's wrong :(

0

That's alright, we all make stupid mistakes sometimes :)
And good job for switching to Code::Blocks, you will not regret it. It is much newer, and more supported/developed.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.