Search Results

Showing results 1 to 9 of 9
Search took 0.00 seconds.
Search: Posts Made By: Chainsaw ; Forum: C++ and child forums
Forum: C++ Jan 11th, 2005
Replies: 97
Views: 25,652
Posted By Chainsaw
This has been a very entertaining discussion!

I love all the "Obviously you have no idea what you are talking about" comments.

I now understand why there is no peace in the Middle East. They...
Forum: C++ Sep 22nd, 2004
Replies: 2
Views: 1,903
Posted By Chainsaw
The linker can remove unreferenced functions too. In VC, under Project Settings/"c/c++"/Customize there's a checkbox called "Enable function-level linking."

Check it, and unreferenced functions...
Forum: C++ Sep 16th, 2004
Replies: 7
Views: 2,127
Posted By Chainsaw
Ah, and here all this time I've been thinking of pass by reference as the same as pass by pointer, but with the compiler hiding the pointer syntax from you. :0)

Yeah, bottom line is that the...
Forum: C++ Sep 13th, 2004
Replies: 6
Views: 2,474
Posted By Chainsaw
the first statements uses logical and (&&) the second uses bitwise and (&), so you might try using '&&=' in the second statement.

The difference might be subtle; say the input_val was '2'. In the...
Forum: C++ Sep 7th, 2004
Replies: 3
Views: 1,856
Posted By Chainsaw
Compilers are usually set up to compile files with ".c" extensions as C and ".cpp" as C++; so if you are going to add C++ only stuff, the first thing to do is rename your .c files as .cpp. (and...
Forum: C++ Sep 6th, 2004
Replies: 14
Views: 5,448
Posted By Chainsaw
It looks like the part starting with

{
double hours[CARS]

is intended to be the main() routine? And then it calls that other routine and passes in hours?

(also, don't forget the semicolon...
Forum: C++ Sep 6th, 2004
Replies: 5
Views: 3,009
Posted By Chainsaw
To help organize your thoughts, how about:

display a prompt to get the file name
read the filename from the console

display a prompt to get the mode (read/write)
read the mode from the...
Forum: C++ Jul 7th, 2004
Replies: 14
Views: 3,544
Posted By Chainsaw
Although I realized after posting that, what you WANTED to know was how to make a reference to a class....

AClass classInstance;
AClass *pClassInstance; // pointer to the class
AClass...
Forum: C++ Jun 17th, 2004
Replies: 5
Views: 35,577
Posted By Chainsaw
Not sure I understand the request, but using new for dynamic arrays goes like this:

void CreateArray( int numberToCreate )
{
// this allocates space and calls the constructor on each...
Showing results 1 to 9 of 9

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC