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

Search:

Type: Posts; User: rohshall

Page 1 of 8 1 2 3 4

Search: Search took 0.67 seconds.

  1. Replies
    7
    Views
    1,568

    Re: static variables, extern, linkage

    hello.h
    static const ::std::string hello = "hello";

    When hello.h is included in a file, it becomes a static declaration with a file scope.
    So, every .c[pp] file will get its own local copy.

    ...
  2. Replies
    2
    Views
    6,745

    Re: C# batch processing

    You can start by learning the database access library ADO.NET
    http://articles.sitepoint.com/article/introduction-ado-net
  3. Replies
    4
    Views
    829

    Re: reconstitute blob as matrix

    Assuming your blob is declared as a three-dimensional array like this:


    float blob[some dimension][32][32];


    the problem seems to be in your local variable - patternArray. Are you allocating...
  4. Replies
    7
    Views
    913

    Re: A question regarding global variable

    Wrong assumption.
  5. Replies
    12
    Views
    1,573

    Re: Class inside the same class

    You can have multimap of particles:
    http://www.cplusplus.com/reference/stl/multimap/



    class particle {
    int x; // particle location
    int y;
    int z;
    };
  6. Replies
    6
    Views
    4,246

    Re: gcc 4.5.1 C++0x thread support

    I found this link that says cygwin does not support pthread_mutex_timedlock function. So, the C++0x threading support is disabled in cygwin.
    ...
  7. Replies
    6
    Views
    4,246

    Re: gcc 4.5.1 C++0x thread support

    I tried it, but that option is also not recognized. I am aware that pthreads is a separate library and I can link using -lpthreads, but this C++0x thread is library separate from the pthreads though...
  8. Replies
    6
    Views
    4,246

    Re: gcc 4.5.1 C++0x thread support

    Thank you all. gcc supports C++0x thread since its 4.3 version
    http://stackoverflow.com/questions/3175450/how-to-compile-and-run-c0x-with-gcc-g-in-eclipse-cdt

    I have read a couple of other blogs...
  9. Replies
    6
    Views
    4,246

    [RESOLVED] gcc 4.5.1 C++0x thread support

    Hi,

    I am trying to compile gcc 4.5.1 for cygwin with support for C++0x threads.
    However, the resulting gcc does not recognize the -pthread option.
    My configure command is:


    ./configure...
  10. Thread: new in C#

    by rohshall
    Replies
    5
    Views
    891

    Re: new in C#

    Use bitwise operators:

    http://www.c-sharpcorner.com/uploadfile/chandrahundigam/bitwiseropsincs11082005050940am/bitwiseropsincs.aspx
  11. Replies
    7
    Views
    1,030

    Re: Problem with unsigned char

    Please post the code in code tags. Also list the compiler error with the line number.
    Anyway, the error is because img is of type char** and charArray is of type char*. And you are copying...
  12. Replies
    1
    Views
    2,685

    Re: Date/Time in filename

    http://www.cplusplus.com/reference/clibrary/ctime/time/
  13. Re: Please recommend a book regarding object oriented design

    Head First - Object oriented analysis and design by O'relly
  14. Thread: __funcsig__

    by rohshall
    Replies
    4
    Views
    3,119

    Re: __funcsig__

    In preprocessing stage, you need to use macros to do a calculation.
  15. Replies
    2
    Views
    931

    Re: Please help to write common method

    Since the only relevant difference is the sql query string, you can pass this string to a common function.
  16. Replies
    3
    Views
    1,635

    Re: Strange Pthread problem

    The function name is pthread_create and not Pthread_create (i.e. it starts with a small p).
  17. Replies
    1
    Views
    627

    Re: small server/client....what's wrong?

    Interesting problem.
    You just have to flush the client writer stream after writing, the same way you do that in the server code.

    And by the way, please use code tags. It preserves the indentation.
  18. Replies
    6
    Views
    2,047

    Re: Classes and Array of Objects

    Since you want to sort using their names, you can just use CompareTo of the string class like this:



    public int CompareTo(Friend other)
    {
    return...
  19. Replies
    10
    Views
    1,036

    Re: Optimization question

    If the information you extract from these files is treated in a similar way by the rest of the code, you can put the interface in a base class say FileDataInfo and have 3 implementations in concrete...
  20. Re: Event handler is being called more than once???

    Can you post the relevant code using code tags?
  21. Replies
    3
    Views
    1,098

    Re: Ugly implementation?

    Yes, IComparable interface is ugly, and for that matter most of the non-generic interfaces. That is why it's better to use their generic counterparts. In your case, it is IComparable<Card>.
  22. Replies
    2
    Views
    694

    Re: Constructors...

    You are already passing a Person object in CDs class. So, you can just store the instance in a private variable of type Person. Alternatively, if you intended to pass a string which is a person name,...
  23. Replies
    7
    Views
    1,667

    Re: Parsing XML Packets into objects

    Thanks so much Arjay.

    One more question.
    How do I make Visual Studio generate these classes instead of typed datasets. Typed datasets are scary. It generates about 400 lines of C# code for a 20...
  24. Replies
    7
    Views
    1,667

    Re: Parsing XML Packets into objects

    Found the answer.
    xsd.exe can generate these classes with /classes command line option.
  25. Replies
    7
    Views
    1,667

    Re: Parsing XML Packets into objects

    How can I generate these classes from the XML file? It is troublesome to hand-code them.
Results 1 to 25 of 195
Page 1 of 8 1 2 3 4





Click Here to Expand Forum to Full Width

Featured