• Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Tree with multiple nodes + memory leak

    line 35: where is the array of curr->action ever set to anything other than NULL? Where is the value of max set (line 35) ? line 37: wrong delete. Since …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in about '::' and MFC

    >but we can do something like that with MFC, right? Wrong. MFC is just c++. If you can't do it in c++ then you can't do it in MFC. Show …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in SQL Create table Error

    line 13: remove the colon after other
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in SQL Create table Error

    The only other problem I see is the comma at the end of the last line which may or may not be a problem. Remove it and see if that …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Need help with Struct.

    You want to sort all the structures by score? If yes, which score? Say each instance of the structure contains 20 scores, which of those 20 scores do you want …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in SQL Create table Error

    Check if the table already exists.
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Gave Reputation to StuXYZ in pointer

    Memory leaks in C++ are about balance and understanding scope [a bit]. First of the fundermentals: for every allocation there must be an equal deallocation. That is about it. Consider …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in about '::' and MFC

    That's right -- your Cow class has no member functions. Compare what you posted with what I posted. You can't just simply remove Speak() out of the class like you …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in What are you eating/drinking right now?

    Went to Good Old Days restarant, had bisquettes & gravy and two scrambled eggs. They make the best bisquettes & gravy this side of UK :)
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in c incompatible types in assignment

    ptr[i] = malloc(sizeof(the_struct)); should be this: `ptr[i] = malloc(sizeof(struct the_struct));` Occasionally I confuse C and C++. In C++ the keyword **struct** is not required. Sorry for the confusion.
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Getting error saying defined constant not a function

    `#define TICKS_PER_SECOND ((GetPeripheralClock()+128ull)/256ull` The compiler sees GetPeripheralClock() as a function call -- remove the () `#define TICKS_PER_SECOND ((GetPeripheralClock+128ull)/256ull`
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Getting error saying defined constant not a function

    Probably the parentheses on line 1. Remove them and see if it compiles. `#define GetSystemClock 200000000UL` Same with line 3 `#define GetPeripheralClock GetSystemClock`
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in c incompatible types in assignment

    Yes, I realized that afer re-reading your original post. Re-read my post and you will see that I corrected it. And I agree with you about typecasting malloc in C …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in c incompatible types in assignment

    As sepp2k alreay said, you can malloc ptr because it's already an array of 100 pinters. Instead you will have to malloc each individual pointer for (i=0;i<=n;i++) { ptr[i] = …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in What are you eating/drinking right now?

    My son and I went to [Outback Steakhouse](http://www.outback.com/specials?gclid=CJujtbmb_70CFcvm7Aodry8Aag) this evening. Yuuumy! I had a Porterhouse steak, very tender and tasted great. I love their [Blooming Onion](http://www.outback.com/menu/bloomin-onion#.U1w1bfldXzE)
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in about '::' and MFC

    virtual implies that the function can be overridden by some derived class. The reason you might do that is to implement the function differently in the derived class then it …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in about '::' and MFC

    Resolve what problem? What do you need more info about?
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in about '::' and MFC

    The function is still in test class, not a class. `void test::print(string message)` line 11 is not quite right either class a:public test { public: a() { print("Hello from Class …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in about '::' and MFC

    >but how these class are done? >because we use what messages we need and not all in class In MFC it's very complicated, there are many levels of inherentence. [Here](https://www.google.com/search?q=mfc+class+hierarchy&tbm=isch&tbo=u&source=univ&sa=X&ei=Ou9bU6DBM-GSyQGR9oCICA&ved=0CCYQsAQ&biw=1069&bih=534) …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in about '::' and MFC

    Simple -- just inherit the base class class Base { .... }; class Derived : public Base { }; Everything that's in Base class is now available ikn Derived. Just …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in C Program - to accept 'n' strings from user and store it in a char array

    Yes, I agree.
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in C Program - to accept 'n' strings from user and store it in a char array

    line 17 is wrong. If you enter the string "Hello" why would you check all 100 bytes of the array when only the first 5 bytes are used? for(i = …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in about '::' and MFC

    CMyAxUICtrl is a class, not an instance of a class. >but it's used outside of main function: Do you mean it's used in some other function? main() has nothing to …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in 2d array

    Let's say you enter the number 5. That means you need to print 5 rows and each row has 5 numbers. The first number on the row tells you how …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Help with a function call

    What compiler are you using? I don't get any errors with Visual C++ 2013.
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Why does Windows XP refuse to die?

    >running a custom shell and file manager also helps detour alot of threats. So does avoiding web sites known for spam/malware, i.e. porn sites and downloading pirated software.
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Get paid to answer questions

    I would be more excited if it said "You accumulated $1,000.00" :)
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Get paid to answer questions

    I rather like the idea of rep and post counts dropping off after 6-12 months. What I did 8 years ago has little relevance today. I'm not very crazy about …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in C# inserting and deleting text from notepad?

    That works with normal text file, has nothing to do with Notepad.exe.
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in retaining output window when using #include<stdio.h>

    >So I thought it would be a part of C++ . It is, but if this is really a c++ program the be consistent and use c++. If not, then …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Fstream read file

    I think your poblem is line 28: After reading the last line in the file line 28 attempts to read the next line, indexing one beyond the end of the …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in ATM Program strlen not working

    how is pin declared? You never posted it, so no one here really knows. In order for that to work pin must be a character array. If pin is an …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Microsoft confirms it's dropping Windows 8.1 support

    Maybe Microsoft has become too big a monster for it's own good. Government should split it up like they did AT&T in 1982.
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Fstream read file

    Look at line 32 -- it's gets(), not cout. gets() waits for you to enter a string from the keyboard and overwrites whatever was in that character array.
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Fstream read file

    why the loop on line 30? that is destroying the contents of the file that was read on likne 26.
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Enum help

    You could use defines instead of the enum on line 1 but that wouldn't be any beneficial than what you have now.
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in bioinformatics research

    Sorry, you are way beyond my skills. Maybe Mike (a DaniWeb moderator and Ph.D. candidate) can help you.
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in C# inserting and deleting text from notepad?

    If you can't hook into notepad xml will do you no good.
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in bioinformatics research

    What's your educational level? Ph.D. is preferable for doing such research.
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in C# inserting and deleting text from notepad?

    The only way I know of is to rewrite the file before Notepad (or some other program) gets it. I doubt Notepad.exe has a hook where you can intercept the …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in ATM Program strlen not working

    How is pin declared? Assuming it's `char pin[5];` line 6 should be `scanf_s("%s", pin);` Note you don't need the & address symbol because the compiler will always pass the address …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Anyone in for homeopathy?

    >if some-one gets relief from their chronic pain by taking sugar pills is it right to stop them from taking them? The problem is not the sugar pills but the …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in How to dial and receive a call with mscomm control

    I think you will have to use something like Skype to do that, or you can spend a couple years reinventing the wheel by writing your own Skype program.
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in retaining output window when using #include<stdio.h>

    @mridul.ahuja: This is c++, not c.
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in about DrawText(): how use new lines\tabs in vertical center of the rect?

    that says nothing about not being able to use VT_EXPANDTABS with DT_SINGLELINE or DT_VCENTER. The link you posted is the same one I posted. If you want to use '\n' …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in about DrawText(): how use new lines\tabs in vertical center of the rect?

    Did you try[ DT_EXPANDTABS](http://msdn.microsoft.com/en-us/library/windows/desktop/dd162498(v=vs.85).aspx) ? >DT_SINGLELINE >Displays text on a single line only. Carriage returns and line feeds do not break the line.
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in How come I get an error registering to forums? Registration denied

    I just successfully registered at [bigfishtackle.com](http://www.bigfishtackle.com/cgi-bin/community/community.cgi). Maybe this thread should be moved to Hardware and Software where someone can help you resolve the problem.
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in KINDLY GIVE ME SOME IDEA OF MY CODE

    In c++ a struct is nearly identical to a class. Just rename the struct to class and make members public
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Keep prompting for values until -1

    You don't need an array. lines 14, 15 and 16 is the wrong kind of loop. There is no restriction on the number of integers that can be entered. You …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Memory de-allocation of array of pointers

    The second one is because l_aAPtr is an array.

The End.