CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: sbrothy

Page 1 of 12 1 2 3 4

Search: Search took 0.22 seconds.

  1. If this is an assignment it is conceivable that...

    If this is an assignment it is conceivable that your instructor hides from you the fact that you shouldn't derive from std::list. The easy way, as you have already discovered, is doing it anyway and...
  2. The concept of containment is simply that you...

    The concept of containment is simply that you include the class you would normally derive from as a member of the new class.
    Hence:

    The class A:



    class A {
    public:
    int foo() const {...
  3. You're not deriving from std::list are you? If...

    You're not deriving from std::list are you? If you are see this thread:

    STL and derivation

    Anyway, you could use containment:



    class MyList
    {
  4. It seems to me you're moving into muddy waters...

    It seems to me you're moving into muddy waters here. You store myObjs in a list and then make the individual objects responsible for deleting themselves and eachother from that list. I think there's...
  5. Thread: Black holes!

    by sbrothy
    Replies
    63
    Views
    3,575

    Here is a picture of a black hole: Black Hole...

    Here is a picture of a black hole:

    Black Hole
  6. Your problem is that CompareName :: operator()...

    Your problem is that CompareName :: operator() takes as it's argument a const reference to a myObj and your myObj::getObjectName() method is not declared as const. Try changing it's signature to:

    ...
  7. Thread: System Stats

    by sbrothy
    Replies
    30
    Views
    1,295

    This thread makes me nostalgic. I remember my...

    This thread makes me nostalgic. I remember my first "computer" (sob!). A wonderful machine. Hacker's choice anno 1983:


    MSX Toshiba HX-22.
  8. Replies
    8
    Views
    1,227

    It seems the gluProject method maps object...

    It seems the gluProject method maps object coordinates to window coordinates. It's C declaration is:




    GLint gluProject ( GLdouble objX , GLdouble objY , GLdouble objZ , const GLdouble *model...
  9. Replies
    8
    Views
    1,227

    I'm not sure what you're trying to accomplish,...

    I'm not sure what you're trying to accomplish, but you declare



    SWinCoorX = new double [10000];


    and then continually use this pointer a a an argument to the gluProject method. Altough it...
  10. Replies
    11
    Views
    2,035

    Did you try std::string::c_str() method: ...

    Did you try std::string::c_str() method:



    #include <cstdlib>
    #include <string>
    #include <iostream>

    using namespace std;
  11. Replies
    3
    Views
    639

    Check out ZLIB (http://www.gzip.org/zlib/). It...

    Check out ZLIB. It can compress data in-memory. The homepage has DLLs you can download.
  12. I know the following information is in italian...

    I know the following information is in italian and from an one of USENET more esoteric newsgroups, but the english information in there may provide you with a clue. I cannot gauge the validity of the...
  13. Uubz, I misread. Not qiote the same problem....

    Uubz, I misread. Not qiote the same problem. Sorry.
  14. Seems this problem has been addressed before: ...

    Seems this problem has been addressed before:

    http://www.codeguru.com/forum/showthread.php?threadid=255351
  15. Replies
    3
    Views
    4,794

    Try here: ...

    Try here:

    http://www.codeproject.com/directx/Tetris.asp
  16. Replies
    7
    Views
    1,301

    You should always check return codes. If...

    You should always check return codes. If GetOpenFileName returns FALSE you can obtain error information through:


    DWORD CommDlgExtendedError(VOID).


    It look suspicous that you set...
  17. Thread: Batch files.

    by sbrothy
    Replies
    1
    Views
    638

    I think the START command under Windows might...

    I think the START command under Windows might help you especially the /B switch. Do:


    start /?"

    in a console to check it out.

    If that doesn't satisfy you can write a simple launch program...
  18. Replies
    3
    Views
    1,108

    Why do you want to put your std::strings into an...

    Why do you want to put your std::strings into an array? Why not use one of the STL container classes? Anyway, declaration number one will probably do the trick:



    std::string ar[2];
    ...
  19. Replies
    10
    Views
    1,565

    I think you will have to post your code....

    I think you will have to post your code. Specifially, it would be interesting to know what you actually do to those poor CString instances :-). At a glance, it looks like your program crashes when...
  20. Replies
    5,488
    Views
    946,260

    Xeon said: Now that is scary! Xeon with a...

    Xeon said:



    Now that is scary! Xeon with a sidekick?!
  21. Replies
    63
    Views
    14,260

    A minimal "Hello, world!".

    This should be fairly standard:



    #include <sstream>
    #include <algorithm>
    #include <iostream>

    template <class X> class K
    {
  22. Divide and conquer!

    Hi there! Just my two cents:

    I think you could benefit from structuring your program better instead of just writing it as one big function. "Divide and conquer" as they say" :-). In other words:...
  23. Thread: DOS question

    by sbrothy
    Replies
    5
    Views
    798

    Try cd "Program Files" or if there are...

    Try

    cd "Program Files"

    or if there are no other folders starting with program you might try:

    cd Program*

    rgds,
    S. Bro
  24. Replies
    1
    Views
    667

    Use "%lf" as the format control string for fscanf...

    Use "%lf" as the format control string for fscanf as in:

    [...]

    double d;
    fscanf(yourstream, "%lf", &d);

    [...]
  25. Replies
    2
    Views
    722

    Check out Microsoft's "Speech API" (SAPI) at...

    Check out Microsoft's "Speech API" (SAPI) at http://www.microsoft.com/speech/


    As far as I remember t's free and it enables you, amongst other things, to treat your computer as a dictaphone and...
Results 1 to 25 of 288
Page 1 of 12 1 2 3 4





Click Here to Expand Forum to Full Width

Featured