Forum: C 3 Days Ago |
| Replies: 1 Views: 164 A program which displays the prime factors of a given number, all the 'hard' work is done by the factorize() function:
/* Find out the prime factors
* of a given number and print
* them on the... |
Forum: C++ 18 Days Ago |
| Replies: 2 Views: 233 Yes, post down your code and tell us what you've problems with to achieve. |
Forum: Java 21 Days Ago |
| Replies: 10 Views: 493 So actually you want your program to take a number as input, and you want a way to get back a given digit n in the number?
For example you have the number 56231012, and you want a way to get a... |
Forum: C 21 Days Ago |
| Replies: 9 Views: 353 Dev-C++ is Windows software, so I think it is safe to assume that he's using Windows. |
Forum: PHP 21 Days Ago |
| Replies: 6 Views: 275 I don't know whether it's the only thing, but look very closely at this:
$tens = array(
1 => 'Ten',
2 => 'Twenty',
3 => 'Thirty',
4 => 'Fourty',
5 => 'Fifty',
6 => 'Sixty',
7 =>... |
Forum: C 22 Days Ago |
| Replies: 9 Views: 353 Before throwing insults to the compiler, could you maybe first post your 100% right code? |
Forum: C 22 Days Ago |
| Replies: 4 Views: 291 What exactly is the purpose of your code?
To me it seems like you're reading a file character by character, and then printing out only the digits?
Why doing a conversion to integer if you only... |
Forum: C++ 22 Days Ago |
| Replies: 3 Views: 254 It would be helpful if you posted your code.
(don't forget the code tags (http://www.daniweb.com/forums/announcement8-3.html)) |
Forum: C 22 Days Ago |
| Replies: 10 Views: 413 Small addition:
(if the return statement was placed inside the main function). |
Forum: C++ 23 Days Ago |
| Replies: 5 Views: 242 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 23 Days Ago |
| Replies: 6 Views: 240 Can you maybe show us what you've attempted already?
If you've nothing (i.e. no code) to show us, then this (for us) means that you haven't made any effort.... |
Forum: C++ 23 Days Ago |
| Replies: 2 Views: 386 Quick help is always possible here on Daniweb, but there's one major exception... (http://www.daniweb.com/forums/announcement8-2.html)
Double post:... |
Forum: C 23 Days Ago |
| Replies: 12 Views: 421 You can always put the call to printf in an if-statement, like this:
#include <stdio.h>
int main(void)
{
if( printf("Hello World!\n") ) {}
return 0;
}
As you can see, no semicolon... |
Forum: C++ 23 Days Ago |
| Replies: 10 Views: 1,822 >Sorry about the reply... I didn't see it was a 6 month old thread resurrected... just answered it...
Never mind, any input is welcome.
>All I wanted just reduce the number of local variables.... |
Forum: C++ 25 Days Ago |
| Replies: 4 Views: 253 Those codes are called backslash codes (or character escape sequences), there's a quite logical reason for why they exist:
What for example when you want to have a string containing a newline or... |
Forum: C 25 Days Ago |
| Replies: 2 Views: 273 And what exactly is your question? |
Forum: C++ 25 Days Ago |
| Replies: 6 Views: 286 http://www.parashift.com/c++-faq-lite/newbie.html#faq-29.17 |
Forum: Geeks' Lounge 25 Days Ago |
| Replies: 179 Views: 8,433 AFAIK 'stripped' is not illegal, as long as you own a legal copy of the software, and you've stripped it down yourself.
But Microsoft doesn't provide support for stripped-down versions of Windows... |
Forum: C 26 Days Ago |
| Replies: 4 Views: 234 >how can I put: CAN'T BE DIVIDED BY 4?
if( (N == 2) && (T % 4) )
{
/* Your code here */
} |
Forum: Geeks' Lounge 26 Days Ago |
| Replies: 179 Views: 8,433 Well, that's because I was not aware of the fact that I'd be a Linux island in a sea of Windows users at the time I chose my alias :P
You have to understand that my brothers and I share one computer... |
Forum: C 26 Days Ago |
| Replies: 3 Views: 284 >I have tried the string length function and it does not work im wondering if someone can point me in the right direction?
As StaticX has told you, you can use the strlen function only if the array... |
Forum: Geeks' Lounge 26 Days Ago |
| Replies: 179 Views: 8,433 I'm only going to say one thing:
That's maybe a reason for anyone out here to stop arguing.
Even when you continue arguing for a century or longer, people will always have different opinions and... |
Forum: C++ 29 Days Ago |
| Replies: 6 Views: 530 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++ 31 Days Ago |
| Replies: 6 Views: 530 Don't use l33t speak here (http://www.daniweb.com/forums/faq.php?faq=daniweb_policies).
Let's see what my dictionary says about the word 'urgent': Anyway, read these and eventually come back when... |
Forum: C++ 32 Days Ago |
| Replies: 7 Views: 295 http://www.gidnetwork.com/b-61.html |
Forum: Java 32 Days Ago |
| Replies: 4 Views: 162 Show your try, then we can see what you did wrong. |
Forum: Java 32 Days Ago |
| Replies: 3 Views: 174 Come on, this is already about the third time you post this question, you better spend your time in figuring out a solution to your problem, double posting is not going to help you.
Double posts:... |
Forum: C++ 32 Days Ago |
| Replies: 3 Views: 253 First off you need to decide whether you're going to use the copy (Windows) or cp (Linux, Unix) shell command for copying the file or whether you're manually going to write the file copy routine in... |
Forum: Java 32 Days Ago |
| Replies: 2 Views: 168 For all those who want quick help (http://www.daniweb.com/forums/announcement8-2.html). |
Forum: C++ 32 Days Ago |
| Replies: 16 Views: 14,567 Fibonacci in its recursive flavor:
int fib(unsigned n) {
if(n <= 1) return n;
else return fib(n-1) + fib(n-2);
}
( returns the nth element of the Fibonacci series )
Or even shorter: |
Forum: Geeks' Lounge 33 Days Ago |
| Replies: 179 Views: 8,433 I said free licenses, not free computers.
You really aren't going to convince me (and probably the other people as well) as long as something very worse happens to me as a result of using Windows. |
Forum: Geeks' Lounge 34 Days Ago |
| Replies: 179 Views: 8,433 To answer the question "Why would everyone use Windows?":
Maybe because it's delivered by default if you buy a new computer? (OEM)
Maybe because Microsoft gives away free licenses of their... |
Forum: Geeks' Lounge 34 Days Ago |
| Replies: 179 Views: 8,433 Why using DirectX? Weren't you an Anti-Microsoft person?
Now it's really becoming curious. |
Forum: Geeks' Lounge 34 Days Ago |
| Replies: 179 Views: 8,433 Vista is also modular, and as far as Linux is concerned I don't like all those different kind of desktops, I just prefer to use something standard, something which I always feel comfortable with, not... |
Forum: Geeks' Lounge 34 Days Ago |
| Replies: 179 Views: 8,433 Well, if we're going to start about nicknames: the mad in your nickname exactly fits with your attitude. |
Forum: Geeks' Lounge 34 Days Ago |
| Replies: 179 Views: 8,433 Sorry buddy, I really have enough of trying all those different Linux distro's, I can believe you when you say that Linux provides better hardware support than Windows, but I've not noticed this yet,... |
Forum: C Oct 7th, 2009 |
| Replies: 3 Views: 256 Take a look at strcat (http://www.cplusplus.com/reference/clibrary/cstring/strcat/).
But strcat on it's own won't solve the whole thing, you'll have to do some other things as well, things which I'd... |
Forum: Geeks' Lounge Oct 7th, 2009 |
| Replies: 179 Views: 8,433 Do it once, image the whole Windows installation, and put back the image when it's reinstall time. Let's see which one is faster now. |
Forum: Geeks' Lounge Oct 7th, 2009 |
| Replies: 179 Views: 8,433 Before I have tried out several different Linux distro's on several different pc's, and I can only say one thing: Linux really didn't convince me at all.
There are just too much things which went... |
Forum: C Oct 5th, 2009 |
| Replies: 9 Views: 741 I've to admit that the union approach was just a bad and clunky advice.
But I just can't get this:
Why would someone use an unportable function to do the job when there's a portable function which... |