Never mind, I figured it out!
Type: Posts; User: Jasel
Never mind, I figured it out!
I'm writing a little MFC application and need to show a message box in which the name of the file that's currently open appears. How can I get a CString with this name? (it's an SDI application)...
So, when you derive a class from another, all non-standard constructors that the original class has are lost? Then what's the point of inheriting? I know, you can still use the member functions, but...
Bummer! I discovered the contest too late... anyway, here's what I would have sent (i hope you don't mind me posting it here, feel free to delete this post if it's so):
//XmasTree: Prints...
Hello everyone, I have the following question: consider this code:
#include <iostream>
class father
{
protected:
Ok, I'll check it. Thanks!
Hello! Does anyone know how one would go about allocating a bitset object (from the standard library <bitset>) dynamically, so that the user can enter its size at runtime? I'm guessing an...
Ok, after reading your posts, I've realized that what was missing from my original attempt was not the copy constructor, but the word CTest before each pair of values in the initialization... lol, I...
Thanks! After defining a copy constructor, I was able to get the desired result with the following statement:
CTest a[3] = {CTest(1, 2), CTest(3,4), CTest(5,6)};
Thanks again! :cool:
Hello! I was wondering, since you can initialize an array of let's say integers with the following statement:
int a[3] = {1, 2, 3};
how would you go about initializing an array of objects of...
I wonder how I didn't see that.... lol! Everything is easier once someone explains it to you. Thank you very much!
Hi. I have a question about a program I wrote to generate a 2D "Array" with user-defined dimensions. Right now the program only asks for the dimensions, fills the elements with an ascending...
I see... thank you very much for the detailed explanation!
That means, if I define a constant with #define, it will be dealt with by the preprocessor, whereas if I define it with const, then it will be the compiler who deals with it? Do you have any advice...
Aha! That makes a lot of sense, I should've thought of it. But when you said compiler you meant preprocessor, right? (just an honest question from a newbie trying to figure out how this thing...
Hello everyone! I've just started to learn C++ and have a question... I've written the following code:
#include <iostream.h>
int main()
{
const int i=1;
int* pi;