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
M

MayankT

@MayankT
About
Posts
54
Topics
6
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Presentation Tips
    M MayankT

    if possible make the full presentation and make a video recording of it. when you watch it you will find mistakes and weak points that simply cannot be pointed out by your self. of course the best thing is if you can get a shameless and bold critic to scrutinize your presentation and pinpoint each and every error you make or anything else for that matter. however small it might be. (you could also try learning from bad experiences :))

    ---------------------- Mayank Thakore Learning C++ - since 1998 They didn't print my card right; so I resigned.

    The Lounge graphics agentic-ai business question

  • Presentation Tips
    M MayankT

    Guy Kawasaki has great tips (and not just for presentations) though its not always possible. for ex. some of my presentations have around 30/40 slides and last upto 3 hours. but since all of my audience are people from my own organisation i can get them to play a short game to get everyone energised :) It works most of the time.

    ---------------------- Mayank Thakore Learning C++ - since 1998 They didn't print my card right; so I resigned.

    The Lounge graphics agentic-ai business question

  • Presentation Tips
    M MayankT

    Jay Nelson wrote:

    Practive your presentation several times

    this is my golden rule too. i am so used to the contents of my presentations that i only focus on presenting it. the content comes automatically.

    ---------------------- Mayank Thakore Learning C++ - since 1998 They didn't print my card right; so I resigned.

    The Lounge graphics agentic-ai business question

  • Presentation Tips
    M MayankT

    I have faced the same problem. So now at the beginning I set some ground rules for the audience. Its not that I spell them out like rules. It would be something like.. "da da da.... and we will wind up with a question and answer session. Of course if you are faster than me please do wait for me to catch up so we can pop your quesion and plug in the answer :)" ( ':)' means to give a big smile here) also i keep enough optional content for time management.

    ---------------------- Mayank Thakore Learning C++ - since 1998 They didn't print my card right; so I resigned.

    The Lounge graphics agentic-ai business question

  • When debugging from VS it works, when running from explorer not
    M MayankT

    try running from VS without debugger (ctrl-f5?) i think problem must be with env and/or project settings. we faced one similar problem where the error occurred only in release mode. we had to change some 3rd party libraries as far as i remember.

    ---------------------- Mayank Thakore Learning C++ - since 1998 They didn't print my card right; so I resigned.

    C / C++ / MFC debugging help visual-studio com windows-admin

  • what to do with ideas?
    M MayankT

    Its like this. One of the ideas is for a web service. But i know nothing about web programming. So should i learn that or find someone who knows? also, the first version can be created not with much difficulty (i think). so how to publish/advertise the web service? see this is where i have a cloud. i don't know where i should start looking for this kind of help. (and i'm worried someone will steal the idea)

    ---------------------- Mayank Thakore Learning C++ - since 1998 They didn't print my card right; so I resigned.

    The Back Room c++ business question learning

  • Adding two large numbers
    M MayankT

    try this: if (MAXVAL - size1 < size2) { //overflow } else { size1 += size2; } MAXVAL can be obtained from limits.h as toxcct said.

    ---------------------- Mayank Thakore Learning C++ - since 1998 They didn't print my card right; so I resigned.

    C / C++ / MFC question css help

  • constant variable at run time
    M MayankT

    Nader Elshehabi wrote:

    What's the difference between declaring a variable as a class member or as a static in a function in a class??

    Actually I meant that a class might not be necessary. And if it is an existing class that is being used then it could be difficult to change the design in a manner as to provide the var at object creation time. This function can be put outside a class or if inside it wont require change to construction code. One difference is that the member var will be unique to each object but as static in a function in a class it will have to be shared.

    Nader Elshehabi wrote:

    You can change temp3 to whatever you want after the call.

    Right! I was tempted to return a val by ref but realized that the guy had already tried to use pointers to manipulate a const var. So this seems safer. Also, even a public class member can be assigned to a temp and anything can be done.

    Nader Elshehabi wrote:

    scenario where we should use this approach

    as in the differences above

    Nader Elshehabi wrote:

    I hope you don't mean reverse engineering?

    Not at all :). Only in this case even if someone uses a pointer to the returned val they will not be changing the actual var storing the const. Actually, only the first line was for you :) Yes your approach is excellent if there is an existing class which is being instantiated after the value is known. I should have thought about that. Thanks for the reply!

    ---------------------- Mayank Thakore Learning C++ - since 1998 They didn't print my card right; so I resigned.

    C / C++ / MFC

  • what to do with ideas?
    M MayankT

    In fact; I think edible toilet paper could be a big hit! I might have a true winner here :omg:

    ---------------------- Mayank Thakore Learning C++ - since 1998 They didn't print my card right; so I resigned.

    The Back Room c++ business question learning

  • constant variable at run time
    M MayankT

    Nader Elshehabi wrote:

    I believe he was asking about casting a const variable to remove its constancy

    not so. i believe he wants to know how to initialize a const var whose value will be known only at runtime. your answer though was correct. making the const var a class member can delay init till runtime. but it is expensive. a better way is to put it in a function as a static const and then init it with an incoming value which has a default. like this: const int var_name (const int var_val = 0) { static const int var = var_val; return var; } then you can use it like this: var_name (temp1); // set const value temp3 = var_name (temp2); // no effect of temp2; temp3 == temp1 but beware that if your first call doesn't pass a value the default will be set. one more advantage is that this way it is much more difficult to use a pointer and modify the value. -- modified at 5:46 Sunday 3rd September, 2006

    ---------------------- Mayank Thakore Learning C++ - since 1998 They didn't print my card right; so I resigned.

    C / C++ / MFC

  • what to do with ideas?
    M MayankT

    another one is to sell flavoured toilet paper :laugh:

    ---------------------- Mayank Thakore Learning C++ - since 1998 They didn't print my card right; so I resigned.

    The Back Room c++ business question learning

  • what to do with ideas?
    M MayankT

    digital man wrote:

    Tell me what they are and I'll tell you what to do with them.

    This is one of them ;P

    ---------------------- Mayank Thakore Learning C++ - since 1998 They didn't print my card right; so I resigned.

    The Back Room c++ business question learning

  • what to do with ideas?
    M MayankT

    I have some billion dollar business ideas :cool:. Should I publish them as papers or wait till I think I am ready to turn them into profitbale ventures :confused:?

    ---------------------- Mayank Thakore Learning C++ - since 1998 They didn't print my card right; so I resigned.

    The Back Room c++ business question learning

  • Validation of matching comments
    M MayankT

    Search for '/*' in the file. It should be found only once and the offset should be 0. Then search for '*/' in the file. Again this should be found only once and offset should be at end of file.

    reddy harish wrote:

    he is entering the file in edit box

    I assumed you have access to the file contents in a string so you can use string::find

    ---------------------- Mayank Thakore Learning C++ - since 1998 They didn't print my card right; so I resigned.

    C / C++ / MFC help tutorial

  • Structure???
    M MayankT

    toxcct wrote:

    the last standard (or the future one) prevents to use the notation without the address operator...

    this is good to remove the slight confusion... is there something planned for using function pointers as well? like: voif func () {} void (*func_ptr) (); func_ptr = &func; (*func_ptr)(); // this is clear on a function pointer being used func_ptr (); // this one is not and could be dropped (though this looks cleaner)

    ---------------------- Mayank Thakore Learning C++ - since 1998 They didn't print my card right; so I resigned.

    C / C++ / MFC adobe help question

  • Structure???
    M MayankT

    lemur2 wrote:

    You can also write: myStruct.app_cb = Foo;

    functions have a unique property that their value is their address i.e. &Foo == Foo not sure if this is standard... works in VC++

    ---------------------- Mayank Thakore Learning C++ - since 1998 They didn't print my card right; so I resigned.

    C / C++ / MFC adobe help question

  • icon files!!
    M MayankT

    In MSPaint do a 'select all; copy' then in VS do 'File->New->File...->Icon file' then 'paste'

    ---------------------- Mayank Thakore Learning C++ - since 1998 They didn't print my card right; so I resigned.

    C / C++ / MFC question help

  • Template classes
    M MayankT

    When defining you must explicitly declare the function as template: template <class _T> TCollection<_T>::TCollection () : pData(0), pCount(0) { } template <class _T> TCollection<_T>::~TCollection () { clear(); }

    ---------------------- Mayank Thakore Learning C++ - since 1998 They didn't print my card right; so I resigned.

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

  • Structure???
    M MayankT

    toxcct wrote:

    void Foo (TFM_PARAM3); TFM_PARAM2 myStruct;myStruct = &Foo;

    Shouldn't we write: myStruct.app_cb = &Foo :confused:

    ---------------------- Mayank Thakore Learning C++ - since 1998 They didn't print my card right; so I resigned.

    C / C++ / MFC adobe help question

  • How to destroy and delete a modeless Dialog
    M MayankT

    I'm new to VC++. WM_QUIT doc says it will quit app. Should we use it for one window?

    ---------------------- Mayank Thakore Learning C++ - since 1998 They didn't print my card right; so I resigned.

    C / C++ / MFC tutorial 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