• Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Would you like to live for 1000 years?

    You just proved my point -- too many chiefs and too few indians (native americans, not referring to people from India). Where I live people who get a Ph.D. are …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in undefined reference to `WinMain@16' - Error

    >undefined reference to `WinMain@16' That normally means you are compiling a MS-Windows GUI program but use main() instead of WinMain(). But I think you need to post code and the …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Linked List String Seperation

    See my answer in your other post. Please, do not double post the same question.
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Storing element of a string on Linked List

    strtok() will destroy the original character array by enbedding '\0' each time strtok() is called. So if you need the original character array then the function that calls strtok() first …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Would you like to live for 1000 years?

    Does that mean we have too many Ph.D. researchers???
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Looping Using Recursion

    The only time I have found recursion useful is when transversing the file system, such as in [this](http://www.daniweb.com/software-development/cpp/code/216812/searching-linux-directories) code snippet. Otherwise I try to avoid it, mainly because many years …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Derived class "improving" base class

    >But it is, saying that a private var (d_lenght) in shape2D cannot be accessed because is private. I think you misunderstood the error message. It means that Shape3D can't access …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in strtok help

    Is this program for school or for a job? You didn't answer my last question. Here is one way to do it. extract() retrieves all the digits from the string …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Password Generator in C

    Oops!
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in The "answer movie name with movie name" game

    Yellow Submarine
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Password Generator in C

    I actually wrote this program today just for fun -- as it turned out I wrote a function that generated a random char between two decimal values, then called it …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Ruin the above poster's wish.

    Granted -- but the planet just ran out of gas so the gas prices are 0. I wish I was a mountain climber
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Pointers

    It doesn't really matter where you put the space in the syntax, the compiler doesn't care. The examples you posted are all acceptable and correct. It's only a matter of …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Derived class "improving" base class

    >I don't understand why it works with private vars if I don't modify the methods and why should I use protected in the other case. **private:** means the derived class …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in using strtok function for counting the vowels in a string

    Then you did something wrong. This works perfectly #include<iostream> #include<cstring> using namespace std; #pragma warning(disable: 4996) int main() { int vowelcounter = 0; char * tokenPtr; char myarray [] = …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Would you like to live for 1000 years?

    >actually It can be really interesting if you tell us the story of your life One word -- "boring".
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Would you like to live for 1000 years?

    I'm with the Reverend -- I'm 70 and still have all my parts too -- just lucky after smoking for 50 years (stopped 13 years ago). I've already lived 10 …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in How is the weather today in your country?

    Wow - what a big mess.
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Gave Reputation to deceptikon in How to put simple Sleep c++ function togetther

    > There is no sleep function that is 100% accurate It really depends on what granularity you're looking for. More precise timing becomes more and more difficult, as you mentioned, …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Gave Reputation to triumphost in How to put simple Sleep c++ function togetther

    > As you can see CPP libs do not come with a time sleep/wait fuction to use > in your code/loop. In C++11: std::this_thread::sleep_for(std::chrono::milliseconds(1000)); std::this_thread::sleep_for(std::chrono::nanoseconds(1000000)); std::this_thread::sleep_for(std::chrono::seconds(1)); std::this_thread::sleep_until(.....); and so on..
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in unable to search second record of a binary file

    Please attach the data file you are using or the program you used to generate it.
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in [win32] - how to change the control backcolor and textcolor?

    That's why I said you have to change the coordinates of SetRect() so that the pixel location is within the coordinates of the static control. You might want to study …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in [win32] - how to change the control backcolor and textcolor?

    this changes the colors, but the text is in the center of the window. I don't know if that is where the control is located or not. I made the …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in [win32] - how to change the control backcolor and textcolor?

    Sorry, I don't think I can help you -- your code has a lot of constructs that are probably from c++11 -- I haven't studied that. Example: `event(NotResize) = [](){; …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in How is the weather today in your country?

    Woke up to light snow this morning, we got about an inch on the ground. I suppose you people in Canada find us sothern Americans somewhat amusing that we close …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in [win32] - how to change the control backcolor and textcolor?

    >sorry, we are 'in same page'? Probably not. When I run your original code snippet it put "Hello" in the window's title bar. I'll help work on it after awhile, …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Password Generator in C

    First, you need to use rand() ([click me](http://www.cplusplus.com/reference/cstdlib/rand/)) to generate random characters that can be used in passwords. Do this in a loop. Each time rand() is called check it's …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in [win32] - how to change the control backcolor and textcolor?

    [SetWindowText](http://msdn.microsoft.com/en-us/library/windows/desktop/ms633546(v=vs.85).aspx) >Changes the text of the specified window's title bar (if it has one). [And another link](http://stackoverflow.com/questions/2056774/win32-how-can-i-set-the-color-of-windows-title-scrollbar-etc)
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Not outputting the value i assigned to variable

    When there are more than 3 or 4 parameters it's better to create a structure or class to hold them all so that the function itself has only one parameter. …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in [win32] - how to change the control backcolor and textcolor?

    From everthing I read the color of the text in window titlebar can't be changed without using [SetSysColors()](http://msdn.microsoft.com/en-us/library/windows/desktop/ms724940(v=vs.85).aspx). There is an example program at the end of that link, but …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in [win32] - how to change the control backcolor and textcolor?

    Note: I'm working up an example of your question. >or the hwnd or even the hdc aren't correct that is the case one of the parameters to WinProc() is the …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in help with a sample array of records in c

    What is "planteas"?
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in I need C Programming help, Asap! please!)?

    >as my professor always said that in order to create a program you must know first the output before you create a code ... Yes, I would agree with your …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in help with a sample array of records in c

    do you mean an in-memory array of integers? such as `int myarray[25];` ? Or are you talking about records in a file or sql database?
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Linked list problem

    >Could you explain me why in every function you use something like: struct item* Yes, because that parameter is the head of the linked list to be used. How else …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in [win32] - how to change the control backcolor and textcolor?

    You need to instantiate a public or static brush so that the colors don't disappear as soon as that function ends.
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Linked list problem

    >seems like normal linked list for me. Yes -- what you want is just two nested normal linked lists. Once you understand simple linked list it is just slightly more …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Linked list problem

    [Here is an example](http://www.daniweb.com/software-development/c/threads/216353/singly-linked-list-implementation)
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Linked list problem

    Were those two structures given to you or can you make them up yourself? There are two linked lists -- Client and within each client node is a Items linked …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Happy 2014 :)

    Oh Damn, now I have to change all my passwords. Happy New Year! I just had a great evening with my family, lots of quality time, hoping you did too.
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in How is the weather today in your country?

    Burrrrr! You can keep all that cold up there, I don't want it down here. It's only a little chilly here today, almost don't need a coat outdoors.
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Happy 2014 :)

    I really miss the old New Year parties from the 1950s and 1960s on TV -- they really new hold to throw parties!
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Ruin the above poster's wish.

    Granted, but the 3d hand is completly useless. I wish I was a car.
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Silverlight designer page error in visual studio 2010

    I just created a project using VS 2013 Pro on Windows 8.1 and had no problems. If your problem was a bug in 2010 then it's probably fixed in either …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in want to know everything about barcode and QR code

    There are [many kinds of barcodes](http://en.wikipedia.org/wiki/Barcode) -- some contain more information than others. [RFID ](http://en.wikipedia.org/wiki/Radio-frequency_identification)contains the most information, such as nearly everything about the product (manufacturer, dates, shipping info, just …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Gave Reputation to kal_crazy in C++ Yes or No without Boolean

    Also, you did not type in #include <string>
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Happy 2014 :)

    This is on my agenda today -- Happy (Hickup) New Year! ![9361c2be19a491d7067ab6c9129da9cb](/attachments/large/0/9361c2be19a491d7067ab6c9129da9cb.jpg "9361c2be19a491d7067ab6c9129da9cb")
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in I need help with my exercice in c prog, please help

    Please tell us what you enter. I don't read whatever language you wrote your program in, so I don't know what it is asking.
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in strtok help

    Do you have to use strtok() for that? You could just parse the string with a pointer, copying each field into another char array.
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in check files in folder

    Suggestion: lines 54-57: It would be easier if you used std::string for pFullPath, then instead of calling strcpy() you could just use the assignment = operator. Then on line 62 …

The End.