User Profile

Collapse

Profile Sidebar

Collapse
Break2
Break2
Last Activity: Nov 20 '08, 08:46 PM
Joined: Jul 17 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Break2
    started a topic Compiler functionality - Step Over
    in C

    Compiler functionality - Step Over

    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,...
    See more | Go to post

  • 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.
    See more | Go to post

    Leave a comment:


  • 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: ";
    cin
    ...
    See more | Go to post

    Leave a comment:


  • Break2
    started a topic Build this simple progam according to earlier standards
    in C

    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.
    ...
    See more | Go to post

  • Break2
    replied to Compiler recommendations
    in C
    What do you mean with switching between codeblocks and Dev-C++?
    See more | Go to post

    Leave a comment:


  • Break2
    started a topic Compiler recommendations
    in C

    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...
    See more | Go to post

  • Break2
    started a topic How to write this simple program according to standards
    in C

    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...
    See more | Go to post

  • Break2
    started a topic Compile / Run step by step.
    in C

    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...
    See more | Go to post

  • 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....
    See more | Go to post

    Leave a comment:


  • Thanks for that Jos and thanks for the thumbs up!

    This is truly a helpfull forum.
    See more | Go to post

    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...
    See more | Go to post

    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...
    See more | Go to post

    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...
    See more | Go to post
No activity results to display
Show More
Working...