ok so i have this
class Poly{
private:
struct node { int exponent;
double coefficient;
struct node *next;
};
Type: Posts; User: dyn4sty22
ok so i have this
class Poly{
private:
struct node { int exponent;
double coefficient;
struct node *next;
};
i get this error
error C2664: 'Poly::addPoly' : cannot convert parameter 1 from 'Poly *' to 'Poly'
I'm having a little trouble with syntax with my program and i need some help.
Can anyone show me the syntax for calling a function from a class with an object as its paramter and the syntax for the...
well, i wrote a previous program where i used a linked list of structs to represent a polynomial broken up into its coeffficients and powers and then passed the pointer to the first structs to...
How would one go about making a link list of objects assuming i already have the class made?
ahh, got it, i'm new to C and still confused on where i should and shouldnt put *'s and &'s. thanks everyone for the help
-Dyn4sty
Awesome, thanks guy i got it but i have another simple question, how would i pass a pointer(to a struct) to a function??
struct node
{
double coefficient;
int power;
struct node *next;...
Ok, so i have a link list of structs.. but in the wrong direction, is there a way to flip the elements in the link list?
for example
if have pointer -> 1-> 2 -> 3 ->Null
but i need it pointer...
Is it possible to have an array of structs which are link listed?
-Dyn4sty
Perfect!! thanks Dave, you're a life saver!
should i still open it in binary mode? if not, i keep getting 0 for len
it store it like this in the output file
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
/*Include this so we can calculate the runtime*/
#include <time.h>
/*Declare necessary constants*/
#define LENGTH 80
#define MAX...
i'm inputting a file that has a sample of text with multiple lines. i'm using fread to read it into a 1D array that has a max of 5000 characters. The text file will have less than 5000 characters...
nevermind, i just had a wrong number, my bad
I'm having a problem with a program, i have a 2D array and each row has a streaming string and i'm guessing you cant access the individual elements cause when i try say for example to output...