Anybody know C++ ??

I hate the VS.. but i need it to compile to see if i did it right... I hate the program I wish I had linux on my PC also but I do not feel like doing a reinstall

 
I hate the VS.. but i need it to compile to see if i did it right... I hate the program I wish I had linux on my PC also but I do not feel like doing a reinstall
You can use a C++ compiler without VS. Borland is a good compiler just off the top of my head that will definately work for you without needing Linux.

 
I actually like VS. When you've got a huge project where there's a lot of interdependence going on, notepad ain't gonna cut it. A good IDE can cut your time on a project down considerably.

As for the original question, you're saying there's four functions and you want to test each function individually? Do these functions depend on the output of previous functions? If not, just design your main() to call each function explicitly

Code:
int main(int argc, const char* argv[]) {
  //to test function1 only:
  [b]function1()[/b];
  //function2();
  //function3();
  //function4();
}

int main(int, const char* argv[]) {
  //to test function2 only:
  //function1();
  [b]function2()[/b];
  //function3();
  //function4();

  return 0;
}

...
and so on. What difficulty are you having?

 
I actually like VS. When you've got a huge project where there's a lot of interdependence going on, notepad ain't gonna cut it. A good IDE can cut your time on a project down considerably.
Thats true but for beginners its a little confusing. I use an IDE too but when I started I was using notepad.

 
Normally, you write the functions and test them first before writing the main program. Just save your written main program somewhere else and use a dummy main program in the meantime to test the functions individually.

 
I guess that makes sense... Our teacher said in about 30 seconds there was an easy way to do it.. but that makes sense to me. I will do that now.. Quick question, how do you call upon a funtion within another function?

 
I guess that makes sense... Our teacher said in about 30 seconds there was an easy way to do it.. but that makes sense to me. I will do that now..
Some IDEs allow you to create test scripts, but I've never used those features so I don't know.

Quick question, how do you call upon a funtion within another function?
You just call that function like you would from the main program or any other time for that matter. Remember that your main is also basically a function in the end.

 
Activity
No one is currently typing a reply...

About this thread

verg

10+ year member
Member
Thread starter
verg
Joined
Location
Vancouver, WA
Start date
Participants
Who Replied
Replies
23
Views
440
Last reply date
Last reply from
Hundreth
IMG_0710.png

michigan born

    May 14, 2026
  • 0
  • 0
IMG_0709.png

michigan born

    May 14, 2026
  • 0
  • 0

New threads

Top