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

Search:

Type: Posts; User: Feoggou

Page 1 of 18 1 2 3 4

Search: Search took 0.02 seconds.

  1. Re: local static variables and thread safety

    thanks for your help guys.
  2. Replies
    0
    Views
    3,539

    How should I install/run my service?

    Hello.

    I'm having the following situation: I'm building an application that requires a service. The service is sometimes creating files and folders, for the user (it actually receives the files,...
  3. Re: local static variables and thread safety

    And what about the static data members?
    I suppose, but I'm not 100% sure, that they're ok. Am I right?

    And, is there a workaround to making a class singletone besides using pointers?
    ie besides...
  4. Re: local static variables and thread safety

    So, the c++ standard says nothing about thread-safety of local static variables?
  5. [RESOLVED] local static variables and thread safety

    Hello.

    I need some quick help here: Are local static variables thread-safe?

    I'm thinking about something like this:


    MyClass& MyClass::GetInst()
    {
    static MyClass myObj;
  6. Replies
    0
    Views
    2,453

    Tests and Profiling

    Hello.

    I work with Visual C++ 2010, but never used test projects (unit tests, etc.) or profiling before. I worked only for myself so far (not in a team), and every time I needed to test something,...
  7. Replies
    1
    Views
    2,042

    Are these good books of c++?

    I have found this webpage:
    http://www.parashift.com/c++-faq/how-to-learn-cpp.html#faq-28.5

    which suggests these books:

    some best-of-breed C++ morality guides:

    1. Cline, Lomow, and Girou,...
  8. Re: how should I arrange classes in files?

    Well, it was an easy thing to put the inline functions in the header and don't use another .cpp file for one or two short inline functions.

    Ok. thanks for helping me. The problem is solved....
  9. Re: how should I arrange classes in files?

    I've made a simple example.

    the compile error is in Exceptions.h, in the constructor, where it calls:

    App::VideoEngine ve;

    the compile error is:

    error C2079: 've' uses undefined class...
  10. Re: how should I arrange classes in files?

    a solution would be to define the GetDevice() function in a .cpp file (that would cause no error), but I don't understand the problem. :(
  11. Re: how should I arrange classes in files?

    m_Video is instantiated in main.cpp but General.h declared it as extern (about this extern I have shown in the previous post)
    But that is meaningless, because if I write:

    ID3D10Device*...
  12. Replies
    2
    Views
    509

    some questions regarding header guards

    1. Which is the best way to do it?

    a.

    #pragma once

    b.

    #ifndef THISFILESNAME_H
    #define THISFILESNAME_H
  13. Re: how should I arrange classes in files?

    thanks a lot.

    When I was writing friend class class2; I was thinking that it is the same as a class class2; + declare it as friend.

    As about the #pragma, I was in a hurry to put these sample...
  14. Re: how should I arrange classes in files?

    I do use #pragma once at the beginning of every header file.

    I've changed my code in a few places. Now I've gotten to a situation like this:

    file1.h:


    namespace one
    {
    class class1
  15. Re: how should I arrange classes in files?

    header guards? you mean, as the Microsoft's #pragma once ? Then, yes. Otherwise, perhaps not.

    I don't know if I can post all my code in one post. Can I know the order in which files are included...
  16. Re: how should I arrange classes in files?

    if I do that I receive the following error:

    error C2757: 'na' : a symbol with this name already exists and therefore this name cannot be used as a namespace name

    perhaps because that header...
  17. Re: how should I arrange classes in files?

    well, in my little bit complicated project, I use: I'll re-check and write:

    in general.h (general.h includes different header files):

    namespace na
    {
    class ca;
    }

    bheader:
  18. Re: how should I arrange classes in files?

    I don't understand what you mean. As far as I know, the definition of a class in c++ can belong in one header file only.
  19. Re: how should I arrange classes in files?

    ok, and if Class2 belongs to myNamespace, and thus, File2.h contains myNamespace which contains Class2, what is it best to do? Is there a way I can share a namespace without including the actual...
  20. [RESOLVED] how should I arrange classes in files?

    Do you know some "good practices"?

    I've came across certain situations where I had to add things to classes that required certain headers and the project could not have been compiled anymore...
  21. Replies
    12
    Views
    2,219

    Re: Is char s[3] = "abc" legal?

    why aren't you just writing:

    char s[] = "abc";?

    but if you really don't want to waste that one byte (which is the '\0' character) you can also write like this:


    char s[3];
    s[0] = 'a';...
  22. Re: What is the difference between these object instantiation methods?

    thanks a lot.

    It seems that if you have a class defined like this:

    class ClassName
    {
    int x;
    public:
    ClassName()
    {
  23. What is the difference between these object instantiation methods?

    What is the difference between these object instantiation methods:

    1.

    ClassName ObjectName;

    2.

    ClassName ObjectName();
  24. Replies
    4
    Views
    1,184

    Re: several STL containers questions

    ok, now I understood what he meant.

    thanks guys for your help.
  25. Replies
    21
    Views
    4,076

    Re: are raw pointers really bad?

    ok, thanks guys for your help. It's clear to me now.
Results 1 to 25 of 442
Page 1 of 18 1 2 3 4


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center