I find the Step Over option to be very helpful in lots of cases.
Pressing one of the function keys makes the program step over, as you all know.
Is there a way to not have to press that function key each time but have the compiler let's say, step over every half a second or so, by itself I mean, so I am able to just watch it without having to do anything myself (assuming the program doesn't ask for input of course,...
User Profile
Collapse
-
Compiler functionality - Step Over
-
I still dont understand something, you say I do not have a left brace but on line 32 I have the left brace. Or I am just missing something?
I actually want to have the changeinteger part to be applicable to integer a changing into integer b and I have used the changeinteger2 part to change integer b into integer a. -
Thanks for that. I just did as you said (except for the 'result' part, I will do that later). My code now looks like:
...Code:#include <iostream> using namespace std; int ChangeInteger(int, int); // prototype int ChangeInteger2(int, int); // prototype int main() { int IntegerA; int IntegerB; cout << "Type 1st integer: "; cinLeave a comment:
-
Build this simple progam according to earlier standards
I am new to C++ and have learned that when I build a program and I want to learn how, it is best to build each program according to the same standard.
In my programs I want to have a function protocol before the main section and a function definition after the main section.
Now I would like to build a program that takes 2 integers and switches them, integer A becomes integer B and the other way around. Simple.
... -
What do you mean with switching between codeblocks and Dev-C++?Leave a comment:
-
Compiler recommendations
I am new to C++ and am currently using Visual Studio 2005 after having first tried Borland C++ Builder 6.0 and CodeGear C++ Builder 2007. The thing I like about Visual Studio 2005 is the 'step over' function it has. 'Step over' lets the compiler go to the next line it processes each time you hit F10. For me that is a nice feature because I can then see what is actually happening on a specific line. For instance, if the compiler reaches a line with... -
How to write this simple program according to standards
I am trying to write a simple program which asks a user to enter 5 integers after which the average will be computed and written to the screen. That simple.
However I want to do it according to a standard I used before to write a program which asked a user to enter the current year and his birthyear after which the current age of the user was computed and written to the screen.
I got some help with the second program from some... -
Compile / Run step by step.
I have worked a couple of weeks with Visual Studio 2005 and in that program you have an option "step by step" or "compile step by step" If you use that option you can see exactly which lines are being processed by the compiler and in what sequence.
I have been trying to find this option in Borland C++ Builder 6.0 and CodeGear C++ Builder 2007 but I am unable to locate it.
I have tried to register... -
Yes, later I discovered I only had to change "int age = (CurrentYear - BirthYear)" to "int age = (current_year - birth_year)" and it worked.
Thanks again for your explanation, it was real helpfull....Leave a comment:
-
Thanks for that Jos and thanks for the thumbs up!
This is truly a helpfull forum.Leave a comment:
-
Thanks for that, nice one, that was helpfull.
I did however need to change some tiny things before it could be compiled. I changed "int age = (CurrentYear - BirthYear)" to "int age = (currentyear - birthyear)" and I also changed "int CalculateAge (int current_year, int birth_year)" to "int CalculateAge (int currentyear, int birthyear)".
Why did you put underscores in the function...Leave a comment:
-
Thanks guys.
@eagerlearner.
I used
int d;
cin >> d;
to keep the console open. If I now use
#include <conio>
along with
getch ()
I get an error on the line with
return x;
telling me that there is a statement missing.
Any suggestions into the best wat to accomplish...Leave a comment:
-
Newbie question - coding standards - how should I write this
I am trying to write to a program that will compute the current age of the one executing the program. It is done by asking 2 questions:
- What is the current year
- What is your birth year
After these have been entered by the user the current age of the user needs to be computed.
I accomplished it because it is not all that difficult. However I want to do it according to standards and I would like...
No activity results to display
Show More
Leave a comment: