Search:

Type: Posts; User: Jasel

Search: Search took 0.00 seconds.

  1. Never mind, I figured it out!

    Never mind, I figured it out!
  2. Getting a string with the name of the current file

    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)...
  3. Replies
    3
    Views
    1,507

    So, when you derive a class from another, all...

    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...
  4. Replies
    88
    Views
    18,090

    Bummer! I discovered the contest too late......

    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...
  5. Replies
    3
    Views
    1,507

    Constructor inheritance

    Hello everyone, I have the following question: consider this code:




    #include <iostream>

    class father
    {
    protected:
  6. Thread: bitstring

    by Jasel
    Replies
    2
    Views
    941

    Ok, I'll check it. Thanks!

    Ok, I'll check it. Thanks!
  7. Thread: bitstring

    by Jasel
    Replies
    2
    Views
    941

    bitstring

    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...
  8. Replies
    15
    Views
    3,548

    Ok, after reading your posts, I've realized that...

    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...
  9. Replies
    15
    Views
    3,548

    Thanks! After defining a copy constructor, I was...

    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:
  10. Replies
    15
    Views
    3,548

    Initializing array and non-standard constructor

    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...
  11. Replies
    2
    Views
    2,650

    I wonder how I didn't see that.... lol!...

    I wonder how I didn't see that.... lol! Everything is easier once someone explains it to you. Thank you very much!
  12. Replies
    2
    Views
    2,650

    Array with user-defined dimensions

    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...
  13. Replies
    6
    Views
    1,232

    I see... thank you very much for the detailed...

    I see... thank you very much for the detailed explanation!
  14. Replies
    6
    Views
    1,232

    That means, if I define a constant with #define,...

    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...
  15. Replies
    6
    Views
    1,232

    Aha! That makes a lot of sense, I should've...

    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...
  16. Replies
    6
    Views
    1,232

    Pointers and constants

    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;
Results 1 to 16 of 16