thanx laserlight but it didnt really work, maybe you can explain it to me a little more
Type: Posts; User: owi_just
thanx laserlight but it didnt really work, maybe you can explain it to me a little more
I am trying to write my own string class but I have trouble writing:
operator<<
operator>>
How do I access ostream and istream?
Please help?
so your saying that there is no reason to use structs in c++?
Quick question:
Someone told me that it's not customary to use structs in c++,
is this true? :confused:
manually?
Dows anyone have any tips on how to sort a list of words (names) ??? thanx
Do I have to define constants?
Can I use the parameters that are passed to the function to declare the size?
Thanks for the help, it helped me undestand alot.
I need to dynamicly allocate a 2 dimensional array in a function.
The parameters that are passed to the function are the columns and rows of the matrix.(Do i use malloc, calloc, new...)?
The function has to be recursive and when I call the function from inside the function i'll have to write:
avgL=AverageOfValues(root->left, &num_of_nodesL);
and from what I understand you can't do...
I have a function that its prototype is:
float AverageOfValues(TNODE *root, int *amm_of_nodes);
I know that, unlike in C++, in C you cant pass variables by-refrence (&var),
My question is how...
thanks salem it worked!!
Pleeaase help,
I have the following code that when I run it in *.cpp file it compiles and works but when I compile it as *.c, I get the following errors:
--------------------Configuration:...
i have a homework assignment to whrite various functions (i.e. adding leaves, counting the nodes ....)and i have to test them on trees to see if i did them right. I thought maybe i can write a...
Can anyone give me an idea of how i can write a program that makes a binary tree so that i can test other programs that work with binary trees?
Can someone explain to me about passing 2 dimensional arrays to functions.
To bemore specific:
I know that the function prototype should look like:
int MatSum(int mat[][N], int row, int col)
but...
isnt there a way to format scanf and then check the return value?
something like :
res = scanf("/*whatever*/", ***);
Im writing a program and in it I ask the user to enter a certain ammount of letters seperated by a space (i.e: "a b c"). How can I do this while making sure the input is valid (separated by a...
thanx for the replies,
i was playing around with it a little more,
whould it work if i declared the struct in one of the .h files and include it in main.c,
whould all the files recognize it that...
I am making a program with multiple *.c files and multiple *.h files.
I want to declare a "typedef struct" like this:
typedef struct node{
char data;
struct node* next;
)NODE;
...
can someone please explain to me how I can get a random number???
Can someone tell me where i can find a good (or any) tutorial on abstract data types?
thanx that helped
Can anybody please tell me how i can convert a binary number to decimal.
And, if its at all possible, how to do it without knowing how many digits are in the binary number
Thanks
hi,
I have to write a few functions that do a few things with two linked list, but the problem is that i have to test them with linked lists. Does anybody have a quick code that can convert an array...