Can someone tell me how to write ` void readBinaryTree(BinaryTree *&p, ifstream &fin) {` in C ... `void readBinaryTree(BinaryTree **p, ifstream *fin) {` `readBinaryTree(&p, fin)` ??? Thanks

Member Avatar
Member Avatar
+0 forum 8

I am once again experimenting and Only to find out that java is pass by value, how do I actually manipulate a method or an array that has been pass to another method? for example [CODE]int[]a ={1,2,3,4,5,6}; modify(a); ________________________ void modify(int[] aTest){ aTest[1]=2; }[/CODE] //take note that those arrays are from a different files/class now the thing is how would I manipulate the reference/original array? I am almost getting the topic but I just need clarification.

Member Avatar
Member Avatar
+0 forum 23

Hi, help please! I have a struct containing an array of pointers to structs containing Binary Search Trees with nodes containing structs. ... <*sigh*> I hate C soo much... put work wants it to be in C. I can set the struct of BST's just fine, and keep it around, and I can set the innermost struct values. My problem is keeping those innermost values once I'm outside the function that puts them there. [CODE] void function(Struct struct, int i, int k) { Array array; array = InitArray(); array->key = k; struct->array[i] = &array; } void otherFunction(Struct struct, int i, …

Member Avatar
Member Avatar
+0 forum 1

I have a class Matrix2D where the matrix is defined as vector<double> elements. I'm trying to use the function Gauss() to perform gaussian elimination on a matrix a [CODE]bool Gauss(Matrix2D& a) { [INDENT][/INDENT]//Gaussian elimination routine }[/CODE] The function itselt works perfectly and if I view the matrix a just before the function ends a is in reduced form. This routine is being called by a parent class structure() as follows [CODE]Gauss(s.getSolMat());[/CODE] where s.getSolMat() returns the matrix to be solved (return SolMat) and s is an instance of a subclass of structure() and parent of Matrix2D(). The problem is if I …

Member Avatar
Member Avatar
+0 forum 2

The End.