Forum: C++ May 12th, 2005 |
| Replies: 9 Views: 1,641 Write out your program out in pseudo-code (how you think its suppose to work) and post it. I can begin to help (and teach) you, then. |
Forum: C++ May 12th, 2005 |
| Replies: 5 Views: 2,916 Maybe I'm not understanding you correctly..
Generated: Thu May 12 16:17:59 2005
[001] for (int i = 0, n = form->ComponentCount; i < n; ++i) {
[002] TComponent *comp =... |
Forum: C++ May 12th, 2005 |
| Replies: 5 Views: 2,916 Can you post code by chance? |
Forum: C++ May 12th, 2005 |
| Replies: 3 Views: 3,012 Are you asking if someone has your homework assignment already completed? |
Forum: C++ May 12th, 2005 |
| Replies: 9 Views: 2,535 Neat I wrote a little C program to format my DaniWeb example code, such that it is formatted in the Kerningham and Ritchie C-style tradition with 8-space tabs and 80 character columns. And to make... |
Forum: C++ May 12th, 2005 |
| Replies: 9 Views: 2,535 #include <fstream>
using namespace std;
int main(int argc, char **argv)
{
ifstream file;
if (argc == 2) {
file.open(argv[1]); |
Forum: C++ May 12th, 2005 |
| Replies: 8 Views: 3,462 I think they're really waiting for you to post back the correct working code ;-) |
Forum: C++ May 12th, 2005 |
| Replies: 6 Views: 7,969 I like KDE, myself. And... if what you mean by "no GOOD media players" is "no media player that can adequately support closed propietary file formats that should have been allowed to exist", you're... |
Forum: C++ May 12th, 2005 |
| Replies: 6 Views: 7,969 Why not program something useful then? |
Forum: C++ May 12th, 2005 |
| Replies: 6 Views: 7,969 KDE already has an mp3 player... http://amarok.kde.org/ |
Forum: C++ May 12th, 2005 |
| Replies: 10 Views: 5,565 Perhaps. You're still young and for most people, including myself, learning takes time and patience. When learning how to program, learning to ask the _right_ questions will yield the most valuable... |
Forum: C++ May 11th, 2005 |
| Replies: 8 Views: 3,462 Maybe you can tell me how one can return (jump) out of this function and then execute:
..
cout << i;
break;
.. |
Forum: C++ May 11th, 2005 |
| Replies: 10 Views: 5,565 I disagree. I think it can seperate a good programmer from an expert programmer no matter what the language or how abstract it is. IMHO an expert programmer not only knows how to use the mechanism,... |
Forum: C++ May 11th, 2005 |
| Replies: 10 Views: 5,565 Oh and please take note of the subtle hint that our dear friend Narue left us: stream input, NOT string input.
It's trully important as a developing programmer to fully understand and... |
Forum: C++ May 11th, 2005 |
| Replies: 6 Views: 9,413 |
Forum: C++ May 11th, 2005 |
| Replies: 10 Views: 5,565 Hello,
I could barely decipher what the heck you were saying. In the future could you please be a bit more articulate. That's the least you could do in return for help.
Now, let's see....... |
Forum: C++ May 10th, 2005 |
| Replies: 2 Views: 1,674 Write MergeSort iteratively and you'll see a performance gain, I bet. |
Forum: C++ May 9th, 2005 |
| Replies: 16 Views: 6,297 Sorta. A reference count keeps track of how many "things" are using that object. So, when you go to _remove_ a file in the file system, with say, "rm" you send to the kernel the unlink()... |
Forum: C++ May 9th, 2005 |
| Replies: 1 Views: 3,212 This is just a guess...
g++ --static bootsector.cpp -o bootsector
objcopy -O binary bootsector bootsector.bin
then write it to the bootsector of the floppy |
Forum: C++ May 9th, 2005 |
| Replies: 5 Views: 1,807 You don't need a site, you need a suggestion :-) Program C++ in C++ |
Forum: C++ May 9th, 2005 |
| Replies: 13 Views: 3,390 <unconstructive>
haha
</unconstructive> |
Forum: C++ May 9th, 2005 |
| Replies: 16 Views: 6,297 Just create and open a file (which gets a reference to it, and associates it with a new file descriptor), remove the file (drops the reference count by 1), close the file descriptor (drops the... |
Forum: C++ May 9th, 2005 |
| Replies: 13 Views: 3,390 Or talk about you on IRC :) Hah j/k |
Forum: C++ May 9th, 2005 |
| Replies: 16 Views: 6,297 You're trying to emulate failure conditions when no failure condition has occured. Sounds mighty stupid to me. |
Forum: C++ May 8th, 2005 |
| Replies: 16 Views: 6,297 So, if you're writing a program that's specific to a "unix" system why not use C and OS libraries?? And, like I told you, your concept and understanding of "deletion" is wrong. You can't detect... |
Forum: C++ May 8th, 2005 |
| Replies: 16 Views: 6,297 So, in *nix, when you open a file descriptor, you grab a reference to that file. Thus, when you unlink(2) that file using the "rm" command, you're only dropping that reference. Because you have a... |
Forum: C++ May 8th, 2005 |
| Replies: 16 Views: 6,297 Why not close the file descriptor? |
Forum: C++ May 8th, 2005 |
| Replies: 9 Views: 1,818 That's quite obvious.
I suggest you pick up a copy of C Programming Language (2nd edition), by K&R. In the meantime, read this:
http://computer.howstuffworks.com/c.htm |
Forum: C++ May 8th, 2005 |
| Replies: 9 Views: 1,818 Besides, is it even necessary to use stdio or stdlib here? Seems like a waste to me. |
Forum: C++ May 8th, 2005 |
| Replies: 9 Views: 1,818 Uh.... this looks like psuedo-code to me... which you probably copied, thus making it [b]not yours (at least in terms of origin).
This question is so foolish and remedial, it'd do you (and the... |
Forum: C++ May 7th, 2005 |
| Replies: 26 Views: 5,325 I'm sure that I'm making a big deal out of something most people "could give two shits about". I'm sure the C forum would be relatively inactive if there were one and that my motivation is rather... |
Forum: C++ May 7th, 2005 |
| Replies: 10 Views: 2,747 You have to be kidding me.
I'm assuming (I'm hoping) this was your intention:
memset(any_student.name,0,sizeof(any_student.name));
..
I'm assuming this barbaric system("PAUSE") is a... |
Forum: C++ May 7th, 2005 |
| Replies: 26 Views: 5,325 It's just a fundamental mistake to lump them together. They are not the same programming language. What you're effectively doing when you say "C/C++" is promulgating a misnomer.
On a forum that... |
Forum: C++ May 6th, 2005 |
| Replies: 5 Views: 1,660 Cool. And while the poll is going, I'll learn to use bbCode *doh* :) |
Forum: C++ May 6th, 2005 |
| Replies: 5 Views: 1,660 C was _designed_ as a procedural language, C++ was _designed_ as an [pseudo] object-oriented language. They are fundamentally different in their higher-level approach. |
Forum: C++ May 6th, 2005 |
| Replies: 5 Views: 1,660 These two languages, for the most part, are completely different; especially now. From culture to paradigm. So let's get a seperate C forum going. |
Forum: C++ Oct 19th, 2004 |
| Replies: 4 Views: 4,250 Using C memory allocation routines in C++ programs is BAD FORM. |
Forum: C++ Oct 15th, 2004 |
| Replies: 6 Views: 3,648 He's passing references to integers (a type of pointer), not integers themselves.
void foo(int & n) {
n++;
}
int main() { |
Forum: C++ Oct 15th, 2004 |
| Replies: 6 Views: 3,648 a switch statement is a mechanism of flow control that can be translated to something like this (provided you return/break after each case),
int cond;
// case 1:
if(cond == 1 {
// case 2:... |
Forum: C++ Oct 14th, 2004 |
| Replies: 4 Views: 2,115 Hopeolicious,
while(x = 0 && x < 3)
{
getdata();
processdata();
putdata();
} |