Hey tom, I have a few error problems that I need help with in TC. I have only posted one because I replying during class at college. I'll post the rest of my errors tommorow for you to look at. Thanks for the help!.
void GetChar();
{
scanf(stdin,"%c",&Look);
}
I get a Suspicious pointer conversion in function GetChar.
const help
Re:const help
Oops, you're right. While it is true that the caret is used for pointer deref, I was mistaken in the syntax, however; the correct syntax is "foo^", not "^foo" as it appears in the code example. Therefore, it cannot be a pointer dereference. While "^foo" is the declaration syntax for pointers, in the context it was clearly setting the TAB character constant, which is, indeed, equal to ctrl-I. Sorry about that.Tim Robinson wrote: The OP's use of the ^ character in the original source (e.g. ^G) is the Pascal way of specifying control characters (read ^G as Ctrl+G). ^A is ASCII 1, ^B = 2, ^C = 3, etc. Hence ^I becomes Tab, which is '\t' in C.
Re:const help
Actually, this doesn't fit into this topic, but I'll continue anyway...:
Why do you all introduce comments in C with a double-slash ('//')? This is not C, but C++! In C, there is only the /* and the */. However, gcc supports it - but it's definetely *not* ANSI C. So, better use /* */ so that other compilers don't have problems with that...
Why do you all introduce comments in C with a double-slash ('//')? This is not C, but C++! In C, there is only the /* and the */. However, gcc supports it - but it's definetely *not* ANSI C. So, better use /* */ so that other compilers don't have problems with that...