- Why I Can't Use Dev C ++ Online
- Why I Can't Use Dev C E Dev C++ For Beginners
- Why I Can't Use Dev C E Dev C++ To Write Program
To quote Adrian's FAQ: Yes that's right, you have to write int main! No matter what your teacher, lecturer, parent, brother, neighbor, friend, xyz C/C manual or web site has told you, and no matter how many compilers accept it, 'void main' always was, is and will be wrong! Main MUST return int, both in C and C! C if.else statement - An if statement can be followed by an optional else statement, which executes when the boolean expression is false. Unlike for and while loops, which test the loop condition at the top of the loop, the do.while loop checks its condition at the bottom of the loop. A do.while loop is similar to a while loop, except that a do.while loop is guaranteed to execute at least one time. The syntax of a do.while loop in C is −. Syntax error. Alright to be more precise, a type-checking error -;).
Well, I use borland compiler now, but if I need to use Dev-cpp to solve this problem, its fine with me.
I use cmd.exe on Windows XP Prof.
My problem is: I want to use the textattr() function of conio.h.. I maked a sample for you, but now I see that I cant get any colors too!
#include <stdio.h> #include <iostream> #include <conio.h> //this should be enough I guess using namespace std; string a; int main() { clrscr(); textcolor(2); gotoxy(3,3); textattr(4); cout << 'This should be underlined?'; cout << endl; cout << 'Wanna end this program? Press a key (Y) and then press enter..'; cin >> a; } |
But both, textcolor, and textattr doesnt work.. When I do textcolor([LIGHT]GREEN)
so, light and without light, it still doesnt work..
Why I Can't Use Dev C ++ Online
but functions, which can be found in conio.h, like clrscr() which clears the screen and gotoxy(3,3) which sets text on coords 3,3 works fine!!!I think this is very strange..
I just want to make a 'input'-field, this was a class I wanted to make..
so it would look like: _______
and then if u enter on it something, the text self would be underlined too..
With such inputs I wanted to make a program, but it seems hard to just make text underlined:S