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. generate regular expressions from a list of strings

    I am reading something from regex format, expands it and writing it out. This list can become huge while writing it out.

    While writing it out, I do not have the original regex data. So, I will...
  2. 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..
  3. 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 =...
  4. Replies
    6
    Views
    6,177

    Resource leak.. ?

    #include<iostream>

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

    int main() {
    int* b = func_b();
    return 0;
  5. 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; }
  6. 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...
  7. Re: Interesting puzzle + function pointers?

    Yep. Great paul. Something like this.

    Let the answers keep coming from oops word. :)
  8. 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...
  9. 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.
  10. 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...
  11. Re: Interesting puzzle + function pointers?

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

    OK. Say my current algo is:

    1
    2
    3
    4
    5
    6
    7
    function func_a() {
  13. 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 13 of 13





Click Here to Expand Forum to Full Width

Featured