And the reason for this is that no one has dared do what the Italians, Spanish and French did: Rework the dictionary whilst not too many people could read/write, so that spelling and pronunciation...
Type: Posts; User: matsp
And the reason for this is that no one has dared do what the Italians, Spanish and French did: Rework the dictionary whilst not too many people could read/write, so that spelling and pronunciation...
Use any of the common mechanisms such as while, do - while or for. Even goto would be better than calling main recursively [recursively here means calling it from a call that somehow came from main],...
As I thought, someone would give a quick answer...
In addition, to prevent inheritance, the actual constructor would have to be private, right?
--
Mats
I think you are doing something wrong in your code if a derived class is generally valid, but can't be used where the base-class can be used. You either haven't made something virtual that should be...
If we assume that "uniform" means "it's roughly the same likelihood of getting all numbers in the expected range", then I'd agree with Tabstop. rand() is not perfect, but for many things it's good...
Why would you? So &my_struct.age, or &st_ptr->age will give you the address of the element age - a pointer to an integer, which is what scanf should have. If you do not use the & operator, you get...
That certainly won't work. For several reasons.
1. &key gives you the address of the object itself (unless operator & for the object has been overridden, which I doubt in this case).
2. The last...
Could you give us the exact error code. "In page error" is not a regular error message. It may have got lost in translation somehow.
--
Mats
The memory you get back from malloc() is completely undefined, never mind that the memory OUTSIDE this is not to be touched - it may not give you an error to read [or even write] it, but it doesn't...
If your system runs out of memory, bad things MAY happen. Most OS's keep some memory in reserve so that system critical functions can still allocate memory.
If your application uses up all the...
Goto is valid if it truly simplifies the code.
If you have a function which takes a couple of locks and then needs to release them [and there isn't a good way using C++ objects to AUTOMATICALLY...
Your code starts three children:
A, which then returns to start a B process.
and B started from the main process.
So you have two "B" processes, one with the main process as parent, and one...
Can you describe, in a different way, what you are trying to do.
What does "external tcp/ip stack" mean? A "non-kernel" tcp/ip stack?
Why do you want to do that? What would the end result be?...
The answer to your question is "it depends".
A global variable is GENERALLY a bad idea. It causes unnecessary connections between function calls that MAY not need to be connected.
The better...
The order you do things in C is important. The value of c is calculated before the input of a and b, so what value do you think c will have?
--
Mats
I'm with you, Brewbuck!
If I suggested such a thing on the ~ 300MHz processors that go into our product, I'd be severely told off by whoever reviews the design document (or code if the design...
for(p = head; p; p = p->next) ...
for-loop walking through a linked list.
--
Mats
nonoob: I agree completely: C is not a good beginner language, for the reasons you suggest: It is very low level [sure there are some really high-level functions in there].
The key here is that...
Both VAX (32-bit version of PDP-11 really) and 68000 have post-increment and pre-decrement versions of it's instruction set. I'm fairly sure that ARM's instructions also matches the C language fairly...
As Laserlight points out, new and malloc behaves differently when there isn't enough memory to satisfy the request. However, the other part of the question is sort of "what should I use", which I...
You mean aside from the fact that new/delete calls the constructor/destructor for the objects it creates, which malloc/free doesn't. Sure, beside that fact, they are pretty much the same. They both...
One of the things that can lead to problems is a program that does something like this:
for(i = 0; i < LARGE_NUMBER; i++)
{
....
ptr = realloc(ptr, i * sizeof(sometype));
ptr2 =...
A proper "idle loop" will be:
here:
hlt
jmp here
But for efficiency, the idle-loop may look more like this:
What exactly are you having trouble with?
--
Mats
What tabstop is trying to say is that the -C option to "make" is "Go to subdirectory of next argument". Since the next thing you give is "SUBDIR=...", make will try to go to a directory called...