Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
A

Arvind Bharti

@Arvind Bharti
About
Posts
17
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • scanf bug?
    A Arvind Bharti

    I've checked it on RH linux too with gcc compiler. Sorry sir, it's not repeatable. Could you please let me know some more details about the program? One possibility is that, this is the part of your big program and something is already there in stdin stream. Did you check the mentioned code as a separate program?

    C / C++ / MFC help question

  • Hard question about Critical section - in C++ ....
    A Arvind Bharti

    A critical section is a small section of code that requires exclusive access to some shared resource before the code can execute. To protect that section of code we need to encapsulate that code in EnterCriticalSection and LeaveCriticalSection function call. Better avoid using 'block' terminology.

    C / C++ / MFC help question c++

  • Casting pointer to pointer of class [modified]
    A Arvind Bharti

    This is just another way of exploiting power of pointers provided by C++. But this is not considered as good practice.

    C / C++ / MFC com help question

  • scanf bug?
    A Arvind Bharti

    It is working perfectly fine in Visual Studio 6.0. Could you please give us some more details about Compiler, Operating System OR any information worth to repeat this problem?

    C / C++ / MFC help question

  • Unmanaged Threading
    A Arvind Bharti

    If we are using Win32 APIs only, then CreateThread would be good enough but if we are using any CRT function that requires tiddata structure, it is must to use _beginthreadex function. Otherwise memory leak will occur because CloseHandle, corresponding to CreateThread API, won't free the dynamically allocated tiddata structure. There is one more problem related to SEH frame. For better understanding, please go through following link: http://www.microsoft.com/msj/0799/Win32/Win320799.aspx

    C / C++ / MFC tutorial question

  • GetTextMetrics
    A Arvind Bharti

    please try the following code: --------------------------------------- hOldFont = SelectObject(hfont1); GetTextMetrics(hdc,tm1); TextOut(hdc, ....); y += tm1.tmHeight + tm1.tmExternalLeading; // Do not forget to clean up. SelectObject(hdc, hOldFont); DeleteObject(hfont1); hOldFont = SelectObject(hfont2); GetTextMetrics(hdc,tm2); ---------------------------------------

    C / C++ / MFC c++

  • [Message Deleted]
    A Arvind Bharti

    Have you heard of “Writing Solid Code” book? Last Chapter is “The Rest is Attitude”. Whatever books you read, whatever tricks you learn, at the end it come the attitude, that drives us to go beyond the good, to go extra mile and to reach excellence. It is not only for programming job, but it is applicable to any kind of job. And this is applicable to the whole world. It has nothing to do with a specific country. Communication skills are not necessary to become a good programmer. Yes it adds one more feather to your cap and helps you to compete on world stage. All I can say for you is that it’s your bad luck that your experience with Indian programmers is not good.

    The Lounge

  • Run multiple process in parallel
    A Arvind Bharti

    I am confused with the subject and the content of message. Subject states you want multiple processes and message talks about threads. Could you please be more specific? In case of process, use kernel-objects like events, mutex, semaphore etc. to synchronize and for threads you can use user-objects like critical section(as well as kernel-objects).

    C / C++ / MFC tutorial question

  • [Message Deleted]
    A Arvind Bharti

    Look at this :confused:person who don't know where to post this kind of discussion topic is raising questions over Indian's programming skills and communication. Better correct yourself rather than passing comments. ;P :-> :zzz::zzz::zzz::zzz:

    C / C++ / MFC

  • string Array
    A Arvind Bharti

    Rather than returning the value, pass the paramter as a reference. void myclass::getStr(CStringArray& csa) { csa.Add("str1"); csa.Add("str2"); }

    C / C++ / MFC data-structures help tutorial question

  • Ignored inline keyword
    A Arvind Bharti

    Kindly look at the another reply thread started by Ryan. Hope you would be able to understand my question.

    C / C++ / MFC c++ question

  • Ignored inline keyword
    A Arvind Bharti

    Thanks Ryan and Stephen. Yes using map files i can find the required information. But still this is manual and I need to manage the list of all inline functions. It will become cumbersome to maintain this list because we can define inline functions in header files without using inline keyword. I am looking for something that can automate this.

    C / C++ / MFC c++ question

  • Stop the screen from dissapear
    A Arvind Bharti

    In case if you don't have any issue in using C functions in C++, then include conio.h and add the following code at the end of function. cout << "Press any key to exit."; getch();

    C / C++ / MFC question learning

  • how does copy constructor works with vector::push_back
    A Arvind Bharti

    To avoid these extra copy constructor, call reserve function. like vec.reserve(5); Everytime you calls push_back, vector has to expand the memory block and copies the elements from the original to new memory block. Here comes the copy constructor in picture. As the size of vector increases, the number of calls of copy constuctor keeps on increasing(directly proportional to number of elements in vector).

    ATL / WTL / STL graphics question

  • Ignored inline keyword
    A Arvind Bharti

    It seems you didn't get my question. I don't have any doubt in how to use inline. I know all the rules of inline. What i am asking is how to find the list of inline function(s) for which compiler has ignored the inline keyword?

    C / C++ / MFC c++ question

  • UTC time Clock and Local time Clock?
    A Arvind Bharti

    The gmtime, mktime, and localtime functions use the same single, statically allocated structure to hold their results. Each call to one of these functions destroys the result of any previous call. Please check the address stored in ptrLocalTime and ptrUTC. Both are same. So you have to make a copy before calling another function.

    C / C++ / MFC question

  • Ignored inline keyword
    A Arvind Bharti

    In C++, inline keyword is a request to a compiler. Compiler can ignore it. Apart from poking through .asm files, is there any way to to find the list of inline function(s) for which compiler has ignored the inline keyword? May be some compiler setting(s) to generate the report containing this information. -- modified at 23:55 Thursday 30th March, 2006

    C / C++ / MFC c++ question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups