What i'm wondering is if there is an easy way to pass a copy of an array to a function. in the following program i pass the address of an array of numbers, a, to the change function. But what i...
Type: Posts; User: manwhoonlyeats
What i'm wondering is if there is an easy way to pass a copy of an array to a function. in the following program i pass the address of an array of numbers, a, to the change function. But what i...
after reading these posts and searching around for other information, i still cannot find anything that i can understand. I am trying to make an ASCII game with some sort of delay function. I tried...
Here is your code modified so that it sorts correctly. I don't know if this is the best way to sort, but it is the way that i know and it works fine. it works like this
y is initally set to 0, z to...
Is there a way to have a class display its name (i.e. base) without setting a varible to it's name? Maybe there is a variable that has contains its name?
class base {
int x,y;
public:...
Is it possible to get the C/C++ code for the object library files, or is it written in assembly or not distributed?
I'm confused where the actual code is for a function from an included header. For example, if I include math.h, then i can use the sqrt() function(among others), but where is sqrt()'s actual code,...
People are always talking about how great unix is for programming C etc. I was wondering what is so great about it, i currently use windows. Also there are diffrent Unix's(i think) which one is...
that probably explains why i dont have them. i use windows.
And i got a good answer
check it out
http://cboard.cprogramming.com/showthread.php?s=&threadid=30234
Are there man pages on C? If so, where can i download 'em?
what are they? everyone always talks about them.
Ok, i figured out what the mistakes were. Now the program works except it doesent work right. it finds the prime factors of 10 right (5*2). But when it tries to find some numbers, like 20 it...
so instead of declaring the variables extern what do i declare them so that every function in my file can access them? auto?
Hi,
im having some trouble with this program that is supposed to find the prime factors of a number. More specificly im having truoble with the extern part. I must not understand the correct...
Who would have known that such a bad question posted by a newbie would become so popular!!
My program would compile fine, but then it would run i would input the first element in the area and it would crash. When i clicked on debug it brought up the line: *ptr=num;
but then it stopped...
Ok, i just tried to write a program using malloc() that takes input and makes for sizeof_array elements then inputs them then prints them. When i try to run it i get an error. Whats wrong with my...
I get it now, malloc() is needed to allocate memory when you dont know how much you are going to need when you write the program, or when the amount of memory needed changes based on a variable.
I was wonderning if anyone knew of a good winsock book, i would prefer one that deals with console applications because i havent learned windows programming yet...
Any suggestions?
When is it used, can i have an example?
What does malloc() do?
I'm reading this book on socket programming and it said that using a non blocking listen() function was too complicated for the book. I'm trying to write a program that does other things while it is...
Never mind, my computer was messing up
thanks
For the first code my broswer says:
C:\DEV-CPP\mingw32\bin\ld.exe: cannot open output file C
Permission denied
and borland command line tools doesent support popen
Is there a way to run a command and then put the return into a variable?