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

Search:

Type: Posts; User: Duoas

Page 1 of 4 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    1
    Views
    747

    Re: initializing array in class

    You've got a couple of significant syntax errors.

    To declare a static field:


    // foo.hpp

    #ifndef FOO_HPP
    #define FOO_HPP
  2. Thread: File I/O help

    by Duoas
    Replies
    51
    Views
    10,506

    Re: File I/O help

    You have opened file_in twice (lines 20 and 22). Be careful there.
  3. Replies
    129
    Views
    21,098

    Re: try to stump me on C++

    @GCDEF, Paul McKenzie
    I said more likely, not absolutely. I've known my share of 'real programmers' too...

    Quite simply, much of the time people doing the hiring are mid-level managers who know...
  4. Replies
    129
    Views
    21,098

    Re: try to stump me on C++

    Yes, but it is often indicative of one. The more a person know about a language's features the more time that person has probably spent using the language. And the more comprehensive that knowledge,...
  5. Thread: File I/O help

    by Duoas
    Replies
    51
    Views
    10,506

    Re: File I/O help

    You can also use the STL


    #include <algorithm>
    #include <fstream>
    #include <string>

    ...

    std::string mystring;
  6. Replies
    30
    Views
    7,854

    Re: Cross Platform Internationalization Concerns

    Good grief.
    If yes, use 4-byte characters. If no, use 2-byte characters. String length is (size of string in bytes / size of character in bytes).

    To determine the file type, open it and look for...
  7. Thread: C++ and 'Make'

    by Duoas
    Replies
    19
    Views
    3,212

    Re: C++ and 'Make'

    Ah, sorry.

    Yes, never put unsafe (unknown) code anywhere in the WINDOWS directory tree.
  8. Thread: C++ and 'Make'

    by Duoas
    Replies
    19
    Views
    3,212

    Re: C++ and 'Make'

    FreeType2 is a popular library used by hundreds of thousands of people around the globe. I wouldn't exactly call it a "strange dll".
  9. Replies
    10
    Views
    1,238

    Re: constructor function

    @STLdude

    How is that any different than what I said?

    @Rajesh
    You did not clearly mention anything about function prototypes in your first post. You only asked about the difference with and...
  10. Thread: C++ and 'Make'

    by Duoas
    Replies
    19
    Views
    3,212

    Re: C++ and 'Make'

    The windows equivalents to those directories are:

    /usr/include
    C:\<compiler's base directory>\include

    /usr/lib
    C:\<compiler's base directory>\lib

    /usr/bin
    C:\WINDOWS\system32
  11. Replies
    10
    Views
    1,238

    Re: constructor function

    People tend towards the first because it can be used to declare variables


    Test testing123;

    whereas the latter looks like a function prototype to the compiler


    Test testing123();
  12. Thread: C++ and 'Make'

    by Duoas
    Replies
    19
    Views
    3,212

    Re: C++ and 'Make'

    @Mikau
    Yeah, the MSYS/MinGW downloads are confusing.

    For MinGW, make sure you get the following packages:

    GCC Version 4
    GNU Binutils
    GNU Make
    MinGW API for MS-Windows
    MinGW Runtime
  13. Replies
    7
    Views
    1,260

    Re: Bit Operation in C++

    Both work just fine. The "best" one is the one that fits your requirements.

    What exactly are you trying to do? (What is your data?)
  14. Replies
    30
    Views
    7,854

    Re: Cross Platform Internationalization Concerns

    Wow, that really is an obnoxious standard.

    The choice of data size depends on whether or not you want to support CJK Extension B. See http://en.wikipedia.org/wiki/CJK_Unified_Ideographs

    You...
  15. Thread: C++ and 'Make'

    by Duoas
    Replies
    19
    Views
    3,212

    Re: C++ and 'Make'

    That is a typical *nix software setup. If you are trying to compile under Windows, you will need to get MSYS and MinGW and compile it under the bash command shell that comes with msys.

    To do it,...
  16. Replies
    5
    Views
    740

    Re: [C] problem with free()

    Does


    while (p != NULL) {
    app = p;
    p = p->next;
    free( app );
    }

    fix it?
  17. Replies
    3
    Views
    810

    Re: C++ Array Problem

    You forgot to add a '\0' (nul) char at the end of your string.


    ...
    char* test = new char[6];
    ...
    test[5] = '\0';
    cout << ...
  18. Replies
    7
    Views
    1,260

    Re: Bit Operation in C++

    Except that using bitfields doesn't guarantee in what order they are packed.

    Just bit-shift the values together:


    unsigned short pack565( unsigned char a, unsigned char b, unsigned char c )...
  19. Replies
    30
    Views
    7,854

    Re: Cross Platform Internationalization Concerns

    Please don't use MBCS. It is evil. It requires an excruciating amount of twiddling to use it (select code page, parse, convert, print, repeat ad-nauseum)

    Use Unicode. It is simple, fast, and works...
  20. Replies
    30
    Views
    7,854

    Re: Cross Platform Internationalization Concerns

    [1]
    You will need to become familiar with the C++ locale and facet objects.
    Googling "c++ internationalization" gets some good hits too.

    A book that might be worth your getting is Standard C++...
  21. Thread: Weird IO Issue

    by Duoas
    Replies
    5
    Views
    734

    Re: Weird IO Issue

    Are you sure the file is opened? (Because you didn't check in the code you posted.)

    Try


    string strInput;
    ifstream inf( "su08_world1.dat" );

    if (!inf)
    cout << "fooey, the file...
  22. Re: Can you define a static member function in a class?

    Your friend is wrong.

    In fact, you cannot do it any other way. Static members must be defined separate from the class declaration. Typically that means that the class declaration goes in a header...
  23. Re: ANSI C: Implementing a stack machine natively working with dynamic strings?

    That seems reasonable.
    Your flag name fooled me for a minute. In addition to indicating whether or not the string is dynamically allocated, you should also indicate whether or not it is a temporary...
  24. Replies
    1
    Views
    2,883

    Re: My string iterator will not dereference

    Did you just type this in by hand?
    Or did you cut and paste?
    Because it has some errors...

    I think that the actual problem is up five lines where you say:

    it=this->begin();
    That should be
    ...
  25. Replies
    12
    Views
    1,115

    Re: counting occurences of combinations

    I'm confused. Are you counting permutations or combinations? They are different things...
Results 1 to 25 of 96
Page 1 of 4 1 2 3 4


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)