And didn't I say twice that it was a bad idea? I'm not telling him to use it, just showing him how to do exactly what he asked, jeez.
Type: Posts; User: Pioneer
And didn't I say twice that it was a bad idea? I'm not telling him to use it, just showing him how to do exactly what he asked, jeez.
You can get a really good completely free upgrade at http://www.borland.com/products/downloads/download_cbuilder.html#. It's the one I use and it's great. It's the second one on the list.
yea, you...
i doubt it, Borland's latest compiler is 6, I use the free 5.5 compiler and it has windows.h.
If you don't have unistd.h or windows.h then you should get a newer compiler.
You can change a character to the number equivalent by subtracting '0'.
#include <stdio.h>
add(char *nums){
int sum=0;
if (*nums=='A'){
while (*++nums!='\0')
Walk down the list until you find a Value greater than the one you have, add the new Value before that.
The memory doesn't expand, it's already there and you overwrite it. The problem is that malloc leaves housekeeping bytes at the end of the block you get, if you write past how much you ask for then...
Use getch if you have it.
#include <stdio.h>
#include <conio.h>
main(){
int key;
printf("Hit a key: ");
Try to read something, if you hit EOF right away then print that the file is empty.
Yea, and when you write past the end of what you have you'll probably write over the housekeeping stuff that free needs so that when you try to free it your program will crash.
#include...
To make a list out of an array just build the list like normal and copy each part of the array into it.
#include <stdio.h>
#include <stdlib.h>
typedef struct list{int stuff; struct list...
I read the guidelines, the FAQs, the tutorials, and lurked for a few days.
Here's a hint moi, 100 is an int, so sizeof(100) is the same as sizeof(int).
Depends on what you're trying to do.
if (name[0]==0){
do this
}
strncpy doesn't add a NULL at the end unless there's more room, strcat is better.
Don't add all that junk until you get the list working, everyone does that and it makes it harder. I fixed the list, but got rid of the stuff not relating to the list. You can add it back.
...
You need to use a string to read the number, then convert it to a double when you've checked it for length.
That prints all .txt files from the current working directory. Change it to *.cpp and it'll only print .cpp files.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
main(){
char direct[80];
char command[84];
command[0] = 0;
&& comes before ||, == and != are the same, there's no telling because you don't know what x is, and 9.
That's the accuracy of sleep, it means if you pass it 1 it may not sleep for exactly 1 second. That has nothing to do with what argument you can pass to it.
When a float is converted to an int, everything past the decimal is cut off. Since everything before the decimal is 0 and everything after is cut off, you have 0. sleep from dos.h is obsolete anyway,...
sleep takes an int argument, when you pass it .5 it actually gets 0 and doesn't sleep at all.
You can't, array indexes have to be int.