Type: Posts; User:
GCDEF is quite correct. You cannot guess c++. You must understand what you are doing. You must have a grasp of the basics before you advance.
As GCDEF said, you really need to take a step back...
cout<<"\nThe choice entered is a wrong choice";
cout<< "Area =" << c.area() << "\n";
cout<< "Volume=" << c.volume() << "\n";
So you are only going to calculate the...
Well you're getting closer!
In your case statements, you haven't actually called the class functions! So in case 1 for example you need
cout << "Area is: " << c.area(x, y) << endl;
In a class, by default all members are private - which basically means that they cannot be accessed outside of the class. This is fine for member variables like r and h, but functions such as area...
Before posting, format your code properly with indentations etc. Then Go Advanced, paste in the code, select the code and then click '#'. To format the code you have already posted, on the bottom of...
Have a look at these
If you want to use a prototype (why??) of
void f(int *a,int m,in n);
then a is a pointer to the first memory address where the integers are stored, and m * n is the number of integers to...
Before posting code, please format properly with indents etc and use code tags (Go Advanced, select code and click '#').
No it doesn't - even if it seems to!
Your code as posted doesn't...
Re b). Please re-read Nuzzle's post #8 re polymorphism and casting. This is probably to what your teacher is referring (albeit badly) - ie int into a double and float into a double. Hence only one...
cout <<"Enter radius\n";
cout <<"Enter height\n";
Where have you defined the variables r and h??
Also note that 3.14 * r * r is not the formula for the surface area of a...
b)Just because the radius and height input from the keyboard can be either an integer, float or double does not mean that you require 3 different functions to calculate the area and 3 different...
If you are going to overload a function, the compiler must be able to differentiate between the various overloaded functions to determine the one to use. Simplified, it matches the number and type of...
Please when you post code format your code properly first and use code tags. Go Advanced, select code and click '#'. Your code is pretty unreadable without.
If you want to read data from a file using the FILE set of functions, then you need to open the file for reading.
fp = fopen("d.dat", "r");
Then assuming the file contains numbers in the...
As GCDEF said, what is the value of i at the end of your fill function? So what value are you returning from the function?
This passes the address of the...
The zip file contains the code from the link.
From your first post
If hardcoding a valid URL in the control at compile does not cause the problem, then IMO the cause of the problem is unlikely to be the control. I would be looking at how...
Have you checked that the contents of m_strURL.GetBuffer() are correct? What happens if you hardcode the URL as in
So do what Paul requested in post #11 and post a complete program that demonstrates the issue.
That's what I originally thought was required, but the output from this doesn't match the results of the given examples.
Nor to me either. I don't understand your example result numbers.
What exactly is the problem you are experiencing? You don't say what is the problem.
How have you used them? because it works OK for me. The following code compiles and runs with MSVS.
using namespace std;
Click Here to Expand Forum to Full Width