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
N

NeoAks007

@NeoAks007
About
Posts
24
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Template Class [modified]
    N NeoAks007

    What's the exact error that is displayed on Output window???

    C / C++ / MFC visual-studio wpf com help

  • visual studio 2005 configuration
    N NeoAks007

    Which type of Windows application are u making?? MFC application or CLR application?? For standard MFC application you need to install Visual C++ runtime libraries and for standard CLR application .NET is required. Compiling MFC application by static linking may avoid the need to install C++ runtime libraries. A way to avoid libraries for VC++ can be found here[^]>. This method may be tried in VC++ 2005 :)

    modified on Sunday, May 3, 2009 11:16 AM

    C / C++ / MFC csharp c++ help dotnet visual-studio

  • Template Class Issues in C++.
    N NeoAks007

    In the End, I had to restructure all my class hierarchies and make the return type same for all functions. So, the problem is now solved!! :)

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

  • Template Class Issues in C++.
    N NeoAks007

    Stuart Dootson wrote:

    If you want to handle them n the same way, then why not make them the same?

    It cannot be made same because their functionalities are different in different classes... I understand that this is holiday but still if anyone reading this thread comes up with an idea, do post a solution please... I need it seriously..... I am still listening.....

    modified on Sunday, March 15, 2009 1:36 PM

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

  • Template Class Issues in C++.
    N NeoAks007

    Thanks for sparing some time.... :) But isn't this approach similar to previous approach??? Still I have to code a lot at caller side as in last solution... Is there no way to reduce coding at caller side??

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

  • Windows Shutdown [modified]
    N NeoAks007

    hxhl95 wrote:

    The only param I don't get is flags, which I put NULL for

    Flags is of type ULONG. Instead of putting it NULL you may try substituting it with some unsigned value like 0x123.... :) And since it's hit and trial approach after all, this might not work. Instead you may try looking for actual kernel calls and then finding right parameter values using tools like process explorer etc. Best of luck!!! :)

    C / C++ / MFC question

  • Template Class Issues in C++.
    N NeoAks007

    Stuart Dootson wrote:

    Yeah, it sucks because you're taking so many decisions.

    Yes, that's a quite heck of a job. Actually search() function is like a framework function which links 2 separate applications. Now if this approach is to be implemented then I have to do a lot of coding at caller side. Also there are about 40-50 functions(may increase with further development) which would call search. And this approach is quite rigid and for instance if new class M object is introduced in class A a lot work would be required. So a more efficient flexible solution is required. :confused:

    Stuart Dootson wrote:

    But I've not really put sufficient thought into it to think of a better one.

    If possible could you please spare some time to think of a better one??? ;P I have nearly wasted a day trying to find workarounds for it and now i cannot think more since here in India it's midnight now and i'm feeling sleepy. :zzz:

    Stuart Dootson wrote:

    Possibly something like Boost.Variant or Boost.Any might make things nicer.

    I am not familiar with Boost libraries. So how could they be implemented??

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

  • Windows Shutdown [modified]
    N NeoAks007

    hxhl95 wrote:

    Oh, and finally, can anyone provide me with some information on the entire windows shutdown process, beginning with the call to ExitWindowsEx?

    Some info is available here.[^] :)

    hxhl95 wrote:

    I wonder if the function params are the same on Windows, since ReactOS has almost the same kernel...

    It's quite possible since ReactOS is designed in such a way that existing windows program can run on it. So, for this the API parameters must be same... This can be verified by calling this function assuming those parameters are correct. If call succeeds then you have got the solution... :-D

    C / C++ / MFC question

  • Template Class Issues in C++.
    N NeoAks007

    Plz do reply posting solution to my problem (other than restructuring class Hierarchies). It quite urgent!!

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

  • Windows Shutdown [modified]
    N NeoAks007

    I don't have much idea regarding this function but you may try at this.[^].... :-D

    C / C++ / MFC question

  • Template Class Issues in C++.
    N NeoAks007

    I had implemented DummyBase this way only. :) But there was problem accessing functions of class B & C through main() . After figuring out why, I have another serious problem now. Actual Implementations of class B and C are: class DummyBase {}; template <'class abc'> class Base{ public: abc func1(); }; class B : public Base`<datatype1`>, DummyBase{ // Class Definitions }; class C : public Base`<datatype2`>, DummyBase{ // Class Definitions }; class A: public Base`<datatype3`>, DummyBase{ public: B obj1; C obj2; DummyBase* search(int condition) //What do I specify return type??? { if(condition==1) return &obj1; if(condition==2) return &obj2; if(condition==3) return this; } }; void main() { DummyBase *ptr; A objA; int n; cin>>n; ptr = objA.search(n); ptr->func1(); //Error : Since DummyBase does not contain func1() }
    Now the problem is that func1() cannot be included in DummyBase since return type of func1() is a template parameter. How to solve this..... :confused:

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

  • [Message Deleted]
    N NeoAks007

    That was a nice one!!! :-D

    C / C++ / MFC

  • [Message Deleted]
    N NeoAks007

    This article[^] could help!! :)

    C / C++ / MFC

  • Template Class Issues in C++.
    N NeoAks007

    N a v a n e e t h wrote:

    You can return pointer to this abstract class instantiated with proper derived one.

    Can you demonstrate how to do it? :confused:

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

  • Template Class Issues in C++.
    N NeoAks007

    Hmmmm.. That seems to be a nice and elegant solution... Let me try it before I thank you (since actual class hierarchies are quite complex so implementing this solution might introduce new errors) !!! :) ..

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

  • Template Class Issues in C++.
    N NeoAks007

    Hi all, I am developing a VC++ console application in which I have encountered a very strange problem. I have a class class A in which there are member objects of other different classes say class B and C. In Class A there is a member function search(int condition). This search() function depending upon argument returns a pointer to the member objects with the class. Code for this is:

    class B{
          // Class Definitions
    };
    class C{
          // Class Definitions
    };
    class A{
    public:
          B obj1;
          C obj2;
          someThing* search(int condition)  //What do I specify return type???
          {
                if(condition==1)
                      return &obj1;
                if(condition==2)
                      return &obj2;
                if(condition==3)
                      return this;
          }
    };
    

    Now the problem is that I am not able to specify any return type since it depends upon the condition which is known at runtime. I tried to introduce template as:

    template -typename type-
    type* search(int condition)
    {
          //Function Definition
    }
    

    But, doing so I cannot call the function from main() since, while calling I have to specify template parameter which again is dependent on condition at run-time. I am empty headed and clueless rite now about solving this weird situation.. :confused: Please suggest any problem solving approach. Also to mention that class structure is not to be changed.... HELP!!

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

  • Needing noob help 7z Archive
    N NeoAks007

    Maybe this http://rarcrack.sourceforge.net/[^] could help. As far as coding is concerned 7z implements AES-256 Bit encryption which is very very hard to crack. Even password of length 8 could take months or even several years to crack considering that characters of password are known. Otherwise you might not even get to the desired password in your lifetime. For coding you may generate your own combination of password strings and test them for correct password calling functions of 7z sdk.... :)

    C / C++ / MFC help csharp c++ asp-net visual-studio

  • Track number of compiles done on a solution
    N NeoAks007

    CPallini wrote:

    This article [^] looks interesting.

    Stuart Dootson wrote:

    How's this article[^] suit you?

    Thanks for the reply. :) Actually i am developing a console application in VC++. Earlier I thought of counting number of builds in some way and then adding the version information in readme file. After reading the suggested articles, I tried to integrate version information within application itself but the solution for those articles are for MFC applications i guess, since they are not working out in my console application. :confused: Can you please tell me a way of integrating version information in console application. I have tried adding "Version" resource in "Resource Files" but I am not able to link it to console application. Also, the addin utility at [^] suggested by Mr. CPallini gives errror that VERSIONINFO Block was not found in .rc file. Kindly suggest me a way to integrate VERSIONINFO block in console application. And since i have posted this question 18 hrs back, i think slight modification might bring this thread under some attention otherwise i have to start a new discussion about this topic. :)

    modified on Saturday, March 14, 2009 8:18 AM

    C / C++ / MFC c++ question

  • string concatenation
    N NeoAks007

    Hi Harish, You could use strcat function provided in string.h to concatenate 2 strings. e.g strcat(str1,str2) concatenates str2 with str1.

    C / C++ / MFC tutorial

  • Track number of compiles done on a solution
    N NeoAks007

    Maximilien wrote:

    Why ? does it serve any purpose ?

    Actually i want to include the number of compiles done on project's solution in my application's version number. e.g. if solution has been compiled 2315 times then version number could be made as v1.0.2315

    Maximilien wrote:

    but you could do a "post-event" script that increment a value and put it in a file somewhere.

    What commands does post event script accept?? C++, DOS or any other?? Could you plz specify how to do that???

    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