Search Results

Showing results 1 to 40 of 74
Search took 0.01 seconds.
Search: Posts Made By: tux4life ; Forum: C++ and child forums
Forum: C++ Oct 19th, 2009
Replies: 5
Views: 284
Posted By tux4life
The constructor is called when (= at the time) an object of a class is created.
The object's destructor is called at the time the object is destructed.
When you've manually allocated memory inside...
Forum: C++ Oct 13th, 2009
Replies: 6
Views: 625
Posted By tux4life
No offense, but I'm not an "avaricious" person like others, I'll do it for only $500 :P
(that's 200 times cheaper than Ancient Dragon's offer :))
Forum: C++ Oct 10th, 2009
Replies: 7
Views: 405
Posted By tux4life
http://www.gidnetwork.com/b-61.html
Forum: C++ Sep 20th, 2009
Replies: 6
Views: 1,525
Posted By tux4life
I already know this kind of game: we make suggestions and never it's a good suggestion because either it's too difficult, or too easy, or too boring, or whatever else.

You know what you can and...
Forum: C++ Sep 19th, 2009
Replies: 8
Views: 589
Posted By tux4life
Post down your code please.
Forum: C++ Sep 12th, 2009
Replies: 36
Views: 1,411
Posted By tux4life
Okay, I really have enough of your double postings in your thread:

a) you won't get help faster by doing this
b) you just make your own thread unreadable
c) you waste your time, use that time to...
Forum: C++ Sep 8th, 2009
Replies: 36
Views: 1,411
Posted By tux4life
First of all I want you to NOT PM me with your questions to do it for you, it won't work, I'm a free person and I'm free to do what I want, and not to do what I don't want (let that be clear).
What...
Forum: C++ Sep 6th, 2009
Replies: 7
Views: 647
Posted By tux4life
The part on how to fix it:
I see you want to compare a string-variable with a string literal, but you're doing something wrong: you're using the =-operator, this operator is also called the...
Forum: C++ Sep 5th, 2009
Replies: 17
Views: 738
Posted By tux4life
To the OP:
No offense, but I can't trust the code you posted down.
Wait, let me explain, I came across a line which looked quite strange to me, and which will never let me compile this program:...
Forum: C++ Aug 29th, 2009
Replies: 35
Views: 1,622
Posted By tux4life
Yep, if you use bitwise AND, then only if the two corresponding bits are one, then the bit in the outcome is also one, otherwise it is always zero (you can derive this rule from that truth table).
...
Forum: C++ Aug 26th, 2009
Replies: 35
Views: 1,622
Posted By tux4life
Not always necessary, but in this case it seems most appropriate.
Just take the way which is easiest for you, and in most cases, it's directly inputting the value.
(If the value is in another base...
Forum: C++ Aug 25th, 2009
Replies: 2
Views: 291
Posted By tux4life
NOTE: Throughout my whole post I assume that bytes consist out of eight bits.

When you use the XOR-algorithm to hash/encrypt your data, there's no need to implement a different way to decrypt your...
Forum: C++ Aug 21st, 2009
Replies: 11
Views: 863
Posted By tux4life
Actually, an array is a list/set of variables, for example:

int array[15];
The above array reserves memory for 15 elements (of type int) (as all arrays start with element 0, the upperbound of...
Forum: C++ Aug 15th, 2009
Replies: 1
Views: 245
Posted By tux4life
-> is called the arrow operator and is often used to access the data members of a structure (via a pointer).
Consider a structure which looks like this:

struct dog
{
string name;
int age;...
Forum: C++ Aug 15th, 2009
Replies: 19
Views: 722
Posted By tux4life
Hmm, smells like you need a structure (often abbreviated as: struct).
structs are used to group related variables into a new user-defined type, let me give you an example, you want to store the...
Forum: C++ Jul 29th, 2009
Replies: 1
Views: 602
Posted By tux4life
>can who suggest me for c mini project ....
Yes, do a forum search. (it will give you plenty of ideas)

>u can also give source code .....
No, you'll have to write that yourself.
Forum: C++ Jul 28th, 2009
Replies: 9
Views: 9,454
Posted By tux4life
This thread is already about 2 years old, and you're still replying in it.
If someone wants to read a good book about C++, then he can check out the sticky...
Forum: C++ Jul 26th, 2009
Replies: 4
Views: 236
Posted By tux4life
>And, I don't understand the reason why you initialise multipy as a string with 2 characters?
Each character string needs a null-terminator.
But I too see no point in using a string here.
It would...
Forum: C++ Jul 21st, 2009
Replies: 19
Views: 585
Posted By tux4life
To start: a foreword on the use of gets()

Damn, how could I have overlooked this:
gets(name);

To the OP, and everyone else who still uses gets to get user input: don't use it anymore, C++ has...
Forum: C++ Jul 21st, 2009
Replies: 8
Views: 352
Posted By tux4life
Logarithms should work as well because you can just derive it to search a power of two.
But, instead of the +1, why not round it?
BTW, iamthwee, you forgot a zero at the end of the number, that...
Forum: C++ Jul 17th, 2009
Replies: 6
Views: 263
Posted By tux4life
I guess you should buy a new keyboard, your comma key appears to be broken.

>how to deal with it???
Read this (http://catb.org/esr/faqs/smart-questions.html) and fix it.
Forum: C++ Jul 16th, 2009
Replies: 9
Views: 359
Posted By tux4life
This is not a solution to your question, I only want to show you how your code would look like in more decent C++, so I basically just changed your code.


#include <iostream>
#include <fstream>...
Forum: C++ Jul 15th, 2009
Replies: 18
Views: 1,010
Posted By tux4life
AD:
*t = _totoupper(*s);
I don't know that function, please tell me about it :P
Forum: C++ Jul 14th, 2009
Replies: 10
Solved: g++ warnings
Views: 669
Posted By tux4life
I have to agree with niek_e, since there's really no reason to not want to see the warnings.
Or are you really begging for bugs in your program?
A warning should be taken seriously, because it...
Forum: C++ Jul 11th, 2009
Replies: 7
Views: 432
Posted By tux4life
Well, you want recursion?
Then go to this thread and read my post: http://www.daniweb.com/forums/post914703.html#post914703
Forum: C++ Jul 10th, 2009
Replies: 10
Views: 555
Posted By tux4life
Hey AD, where are you increasing i ?
According to that code, all the elements after element 0 in the ints array will remain zero, only the first element (element 0) would be able to change.

So I...
Forum: C++ Jul 9th, 2009
Replies: 3
Views: 469
Posted By tux4life
>I also want to read from the passwords file and check if the password has been already generated...... If yes, then generate a new password .....
Well, you could for example at the start of the...
Forum: C++ Jul 2nd, 2009
Replies: 5
Views: 188
Posted By tux4life
>WARNING: NO NEW LINE AT THE END OF FILE
>What should I do?

Move your cursor to the end of the latest line of your file and press ENTER.
Then try recompiling your source, the warning should be...
Forum: C++ Jun 29th, 2009
Replies: 5
Views: 283
Posted By tux4life
Consider the following code:

#include <iostream>

int main()
{
int a[5] = {0, 5, 2, 3, 4};
int *p = a;

++*++p;
Forum: C++ Jun 28th, 2009
Replies: 9
Views: 601
Posted By tux4life
>Why would we need to make something private within a program?

Well, that's just the principal of data encapsulation: It's better that you let the object manage his own data members (in this...
Forum: C++ Jun 28th, 2009
Replies: 18
Views: 744
Posted By tux4life
Most of the time, the functions to create a GUI are part of an API, but the difference lies in the fact that an API doesn't necessarily have to feature a GUI, we could for example talk about a...
Forum: C++ Jun 28th, 2009
Replies: 11
Views: 851
Posted By tux4life
>I was trying to explaining op the purposes of using a copy constructor with that,thats it,I know the way I took is hopeless.

Why not just providing some links?...
Forum: C++ Jun 25th, 2009
Replies: 7
Views: 252
Posted By tux4life
To be honest I have never had to use them up until now.
You should only implement something in your program if there's need to, it's not because you've the possibility to do something, that you...
Forum: C++ Jun 24th, 2009
Replies: 3
Views: 792
Posted By tux4life
>Memory is deleting here???...what is happening....?
Well, my eyesight is not good enough to see your code from here :P
Could you post it please?
Forum: C++ Jun 20th, 2009
Replies: 5
Views: 1,451
Posted By tux4life
Please don't mind reading my previous post, just read this article:
http://notepad-plus.wiki.sourceforge.net/NppExec+Compiler+Guide :P
Forum: C++ Jun 12th, 2009
Replies: 13
Views: 15,588
Posted By tux4life
>It's a legitimate question. Are you really trying to accomplish something by flaming the guy, or just being an ass?
I didn't want to blame anyone, Narue, but didn't you once write the following?
...
Forum: C++ Jun 11th, 2009
Replies: 16
Solved: Bits in a byte
Views: 743
Posted By tux4life
>And I've read that you should use sizeof to determine the size of a byte?
No, you read it wrong, a byte is a general term for any valid combination of eight bits (and a bit is a one or a zero)...
Forum: C++ Jun 11th, 2009
Replies: 13
Views: 15,588
Posted By tux4life
>Can you please explain a little how you derived the formula c = c * (y - x) / (x + 1); ....just to get the idea of what steps to do in order to reach this formula

Dude, are we going the reinvent...
Forum: C++ Jun 8th, 2009
Replies: 6
Views: 366
Posted By tux4life
To the OP:

> // paste code here
We aren't going to post free code for you, however we can help you to accomplish the more tricky parts, give us a thorough problem description (not just: My...
Forum: C++ Jun 3rd, 2009
Replies: 4
Views: 254
Posted By tux4life
What??

Edit:: Your (unformatted) code looks much more like C than like C++ !
Showing results 1 to 40 of 74

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC