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

Search:

Type: Posts; User: hemant.bhargava7

Search: Search took 0.01 seconds.

  1. Re: Out-of-bounds access (ARRAY_VS_SINGLETON)

    That is exactly clarification I was looking for.. I should have figured that out myself.
    Thanks for your help..
  2. Out-of-bounds access (ARRAY_VS_SINGLETON)

    Need little help..

    #include <iostream>
    int main() {
    int bit = 1;
    int init = 0xf ^ (1 << bit);
    char* c = new char(2);
    sprintf(c, "%x", init);
    std::string initVal =...
  3. Replies
    6
    Views
    974

    Resource leak.. ?

    #include<iostream>

    int* func_b() {
    int *c = new int;
    return c;
    }

    int main() {
    int* b = func_b();
    return 0;
  4. Re: Workaround for accessing non-static members inside static member functions

    Paul, Again thanks for quick reply. Yes. It is same as you expected.
    class A {
    public:
    var_a;
    }
    class B : public A {
    static func_a();
    }
    B::func_a() { // Need to use a; }
  5. Workaround for accessing non-static members inside static member functions

    What are the workarounds for accessing the non-static member variables of some class(Say A) inside static member functions of another class(Say B)? I am coding in c++. Class A is derived with public...
  6. Re: Interesting puzzle + function pointers?

    Yep. Great paul. Something like this.

    Let the answers keep coming from oops word. :)
  7. Re: Interesting puzzle + function pointers?

    [QUOTE=Paul McKenzie;2129035]You should take a step back and look at your "algorithm" from a much higher level instead of trying to figure out what lines to move where.

    Paul, Thanks for your...
  8. Re: Interesting puzzle + function pointers?

    2kaud,

    I appreciate your answer but to me, at least, this is not a clear solution. Because creating extra files are pain.
    I wanted to something in terms of function pointers/functors, if possible.
  9. Re: Interesting puzzle + function pointers?

    GCDEF et All. Thanks for your replies.

    Not accepted because common lines lies at end of func_a and func_b as well. So, basically you are suggesting to call me two functions. :)


    What I was...
  10. Re: Interesting puzzle + function pointers?

    I really do not know how there numbers appeared into my post. Please ignore them. 1, 2 .. 7 etc.
  11. Interesting puzzle + function pointers?

    OK. Say my current algo is:

    1
    2
    3
    4
    5
    6
    7
    function func_a() {
  12. How to call a function from one program that's in another program

    How to call a function from one program that's in another program?

    Suppose i have two files A.c And B.c . Now i want to run A.c but found that B.c is having the same function which i want to write...
Results 1 to 12 of 12


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center