Forum: C++
Jul 4th, 2008, 9:00 AM
|
|
Replies: 3
Views: 111
Re: do while loop error or not
I know this isn't related to your problem, but have you considered using std::string's and C++ methods of converting strings?
I usually do something like this when I encounter this sort of thing in...
|
Forum: Software Design and Algorithms
Jul 2nd, 2008, 11:17 PM
|
|
Replies: 11
Views: 251
|
Forum: Software Design and Algorithms
Jul 2nd, 2008, 5:53 PM
|
|
Replies: 11
Views: 251
|
Forum: Software Design and Algorithms
Jul 2nd, 2008, 5:27 PM
|
|
Replies: 11
Views: 251
|
Forum: C
Jul 2nd, 2008, 11:47 AM
|
|
Replies: 5
Views: 177
Re: syntax error before printf
There are two big problems with your code.
1) You have no notion of "standard" indenting and block practises so it is almost completely unreadable.
2) You have several misunderstandings of how the...
|
Forum: Software Design and Algorithms
Jul 1st, 2008, 11:26 PM
|
|
Replies: 11
Views: 251
Re: Sane's Monthly Algorithms Challenge #3 [07-08]
There is a particular algorithm that Boost offers that would really help in the Junior class. Do you have Boost installed?
EDIT: Nevermind; ignore the question. I'll keep my post intact for clarity,...
|
Forum: C++
Jun 30th, 2008, 10:10 PM
|
|
Replies: 8
Views: 138
|
Forum: C
Jun 29th, 2008, 9:12 PM
|
|
Replies: 10
Views: 295
|
Forum: C++
Jun 29th, 2008, 3:24 PM
|
|
Replies: 3
Views: 100
Re: segmentation fault with sprintf
This little snippet works perfectly:
#include <stdio.h>
char buff[256];
int main( void ) {
int lines = 10;
sprintf( buff, "lines: %d", lines );
|
Forum: C
Jun 29th, 2008, 9:07 AM
|
|
Replies: 10
Views: 295
|
Forum: C
Jun 28th, 2008, 11:46 AM
|
|
Replies: 10
Views: 295
|
Forum: C
Jun 26th, 2008, 11:42 PM
|
|
Replies: 10
Views: 295
|
Forum: Coder's Corner Lounge
Jun 26th, 2008, 8:47 PM
|
|
Replies: 7
Views: 127
Re: Ubuntu 8.04 Questions.
If I remember correctly, the package for Flash is flashplugin-nonfree.
In that case, the command to run would be
sudo aptitude update
to first update the repositories and then
sudo aptitude...
|
Forum: Coder's Corner Lounge
Jun 21st, 2008, 10:25 AM
|
|
Replies: 15
Views: 298
|
Forum: Other Programming Languages
Jun 17th, 2008, 11:23 AM
|
|
Replies: 18
Views: 564
Re: D Programing Language-To replace C/C++?
I was initially smitten by D (as grumpy can attest to), but I've lost most of my interest in it.
While it offers some very nice solutions to C++, it is plagued by 3 things in my opinion:
1)...
|
Forum: C++
Jun 17th, 2008, 11:17 AM
|
|
Replies: 9
Views: 296
Re: Starting C++ GUI Programming
My vote goes for Qt. It's extremely well documented, it 100% cross-platform, and very easy to use (from a programmer's perspective).
I'm not the biggest fan of C++, but I'd use it just to use Qt....
|
Forum: Other Programming Languages
Jun 12th, 2008, 9:22 PM
|
|
Replies: 3
Views: 173
Re: Learning haskell
Could you expand on what doesn't work with foldl? Are you getting incorrect results? Compile errors? I'm a novice with Haskell (too much like a puzzle, IMHO), but I know a little bit.
Here's some...
|
Forum: Coder's Corner Lounge
Jun 7th, 2008, 9:59 AM
|
|
Replies: 16
Views: 551
|
Forum: Coder's Corner Lounge
Jun 6th, 2008, 7:35 AM
|
|
Replies: 5
Views: 160
|
Forum: Software Design and Algorithms
Jun 1st, 2008, 3:34 PM
|
|
Replies: 6
Views: 218
Re: SMAC #1 [05-08] - Results
Damn. :)
Now I just want to know why I got the first one wrong for the junior level problem. I'm still happy with 100/100 and 90/100.
I'm assuming you wrote a program to do all the evaluations/keep...
|
Forum: Coder's Corner Lounge
May 30th, 2008, 10:19 PM
|
|
Replies: 11
Views: 338
Re: Ubuntu- which flavor?
They're all very similar. AFAIK, they only differ by the desktop environment (DE) they use.
Any choice would likely work equally well, though normal Ubuntu (which uses Gnome as the DE) is the most...
|
Forum: Coder's Corner Lounge
May 30th, 2008, 10:17 PM
|
|
Replies: 16
Views: 490
Re: Yeeaaaah! I did it!!
Sounds amazing. I'm sure you'll make us proud, eh?
Did you get my submission email, oh C.S. master? ;)
|
Forum: C++
May 28th, 2008, 6:00 PM
|
|
Replies: 4
Views: 200
Re: Classes : Using data from outside the class
Well, I'm not too familiar with design patterns and such, but what you're describing doesn't sound like a typical solution.
Without you actually posting code, my question would be: Why are you...
|
Forum: Bash / Shell Scripting
May 25th, 2008, 9:38 AM
|
|
Replies: 2
Views: 149
|
Forum: C
May 22nd, 2008, 8:22 PM
|
|
Replies: 9
Views: 389
|
Forum: C
May 19th, 2008, 11:27 AM
|
|
Replies: 9
Views: 389
Re: Implement a queue using share memory?
I'm not entirely sure, but it might mean that instead of allocating memory on the heap for every node in the queue, that you instead allocate a "pool" of memory for the whole structure and assign...
|
Forum: Software Design and Algorithms
May 3rd, 2008, 2:29 PM
|
|
Replies: 31
Views: 1,423
|
Forum: Software Design and Algorithms
May 3rd, 2008, 2:14 PM
|
|
Replies: 31
Views: 1,423
|
Forum: Software Design and Algorithms
May 3rd, 2008, 1:40 PM
|
|
Replies: 31
Views: 1,423
|
Forum: C++
Apr 29th, 2008, 11:31 PM
|
|
Replies: 2
Views: 140
Re: Cannot Function C++ Linked List
Your code as it stands is very confusing to me, but that may just be because it's midnight where I am.
At the moment, your player class contains a list of players. What that means is that every...
|
Forum: C++
Apr 28th, 2008, 4:19 PM
|
|
Replies: 6
Views: 261
|
Forum: C++
Apr 27th, 2008, 10:13 AM
|
|
Replies: 9
Views: 300
|
Forum: C++
Apr 26th, 2008, 3:27 PM
|
|
Replies: 9
Views: 300
Re: Returning to the main function from another
The best analogy I can come up with regarding this is like digging a hole.
When you call a function, you dig a hole into the ground. To get back to where you started, you have to climb out of the...
|
Forum: C++
Apr 26th, 2008, 7:50 AM
|
|
Replies: 9
Views: 300
Re: Returning to the main function from another
In your Sobiranje() function, to return to main(), just replace your return main() code (which makes absolutely no sense :)) with a return statement.
If you'd like to know why, I (or someone else...
|
Forum: Python
Apr 25th, 2008, 10:20 PM
|
|
Replies: 12
Views: 437
Re: I am looking for
We will help you, but you seem to think that "help[ing] me" is the same as "writing my programs for me".
We can help you by explaining fundamental concepts if they are unclear, by clarifying the...
|
Forum: Python
Apr 19th, 2008, 6:01 PM
|
|
Replies: 2
Views: 163
Re: Invalid Syntax error
On line 29, you don't use a closing ')'. Post the actual error next time please. :)
http://pastebin.com/m2c434db5
|
Forum: C
Apr 19th, 2008, 11:15 AM
|
|
Replies: 4
Views: 271
Re: stdio.h what language is it
Any header files used by C (stdio.h, math.h, stdlib.h, string.h, etc) are all written in C. Where you might be getting confused is that most implementations of the C standard library that I've seen...
|
Forum: C
Apr 15th, 2008, 7:03 AM
|
|
Replies: 5
Views: 248
Re: port scan detection
I don't know anything about this, but if I wanted to, I would look at the source for nmap. nmap is a fairly popular port-scanner for (Li, U)nix and you might get some ideas from it.
|
Forum: Python
Apr 14th, 2008, 8:08 PM
|
|
Replies: 5
Views: 328
Re: 'C'oo'P'eration!
I had heard about Lua through an article and I had never done any extending or embedding before so I thought I'd try something.
Lua is extremely light, both in terms of memory footprint and standard...
|
Forum: Python
Apr 8th, 2008, 4:57 PM
|
|
Replies: 5
Views: 328
Re: 'C'oo'P'eration!
http://docs.python.org/ext/ext.html
http://www.boost.org/doc/libs/1_35_0/libs/python/doc/index.html
|