paul classes dont need values. they refrence points. its completely fine for i to be used. good logic to op. im impressed. but i "think" ur show functions not working because there never was a show function.
you have intarray::show().
which calls something in intarray but problem is though its there. there is nothing in it. what you could do is creat show() and then call it from within intarray(). for now ur using an empty function. i'll give you an example of a recent libarry i created for a friend.
its a rather simple controller for a project he was working on. works fine and everything and makes coding his project pretty simple too. there may be a flaw or two cause i just edited it slightly but as far as i can see on his table its perfect
anyway i use similar structure with "blank arrays" (lol) there all user defined and such. though i dont use classes just functions iether way works pretty well. may update it soon but its gettin the job done for something that took me like 10 or 20 minutes to write.
#ifndef Table_Runner
#define Table_Runner
#include <avr/interrupt.h>
#if defined(ARDUINO) && ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif
int redcon(int a,int c,int d,int e,int f[20],int F[20]) {
int asf;
a= analogRead(c);
a = map(a, d,e, 0, 4095);
a = constrain(a, 0, 4095);
for(asf=0;asf<20;asf++) {
Tlc.set(f[asf],a);
//Tlc.set(F[asf],a);
}
Tlc.update();
}
int clr_pkr(int a,int A,int E,int I,int t, int T,int c,int C,int D,int Q,int w,int W,int d,int e,int f,int F,int G) {
int x=0;
int X=0;
int x1=0;
int ar[]={0,10,20};
int ae[]={0,10,20};
int aw[]={10,20,0};
Tlc.set(2,4095);
Tlc.set(19,4095);
Tlc.set(29,4095);
Tlc.set(1,4095);
Tlc.set(11,4095);
Tlc.set(21,4095);
Tlc.set(8,4095);
Tlc.set(18,4095);
Tlc.set(28,4095);
// read the sensor:
a= analogRead(c);
A= analogRead(C);
E= analogRead(D);
I= analogRead(Q);
t= analogRead(w);
T= analogRead(W);
// apply the calibration to the sensor reading
a = map(a, d,e, 0, 4095);
A = map(A, d,e, 0, 4095);
E = map(E, d,e, 0, 4095);
I = map(Q, d,e, 0, 4095);
t = map(w, d,e, 0, 4095);
T = map(W, d,e, 0, 4095);
// in case the sensor value is outside the range seen during calibration
a = constrain(a, 0, 4095);
A = constrain(A, 0, 4095);
E = constrain(E, 0, 4095);
I = constrain(Q, 0, 4095);
t = constrain(t, 0, 4095);
T = constrain(T, 0, 4095);
while(I>200) {
if(a>0&&a<200) {
Tlc.set(f,x+5);
if(x>4080)
Tlc.set(f,x-5);
}
if(A>0&&A<200) {
Tlc.set(f,X+5);
if(X>4080)
Tlc.set(f,X-5);
}
if(E>0 && E<200) {
Tlc.set(f,x1+5);
if(x1>4080)
Tlc.set(f,x1-5);
}
for(int m=0;m<3;m++) {
if(t>0 && t<200 && I>200) {
Tlc.set(ar[m],4095);
Tlc.update(); }
else
if(I<200) m=3;
}
for(int m=0;m<3;m++) {
if(T>0 && T<200 && I>200) {
Tlc.set(ae[m],4095);
Tlc.set(aw[m],4095);
Tlc.update(); }
else
if(I<200) m=3;
}
}
}
int grncon(int a[10],int c[10],int b,int d[10],int e[10],int f[10]) {
for(b=0;b<9;b++){
a[b]= analogRead(c[b]); }
for(b=0;b<9;b++) {
a[b] = map(a[b], d[b],e[b], 0, 4095); }
for(b=0;b<9;b++) {
a[b] = constrain(a[b], 0, 4095); }
for(b=0;b<9;b++) {
Tlc.set(f[b], a[b]); }
}
int blucon(int a[20],int c[20],int b,int d,int e,int f[20]) {
for(b=0;b<20;b++){
a[b]= analogRead(c[b]); }
for(b=0;b<20;b++) {
a[b] = map(a[b], d,e, 0, 255);}
for(b=0;b<20;b++) {
a[b] = constrain(a[b], 0, 255); }
for(b=0;b<20;b++)
Tlc.set(f[b], a[b]);
}
/*
a=sensor pin
b= sensor value coresponding
c= array indicator
d= led pin
e= sensor min
f sensor max
*/
int calcups(int a,int b, int e, int f) {
Tlc.init();
pinMode(13, OUTPUT);
digitalWrite(13, HIGH);
//calibrate each sensor 5 seconds
while (millis() < 5000) {
b = analogRead(A7);
Tlc.set(0,1024);
if (b > f) { // record max
f = b; }
if (b < e) { //record min val
e = b; }}
digitalWrite(13, LOW);//end of cal
}
int cCalcups(int a[10],int b[10], int e[10], int f[10]) {
Tlc.init();
int c;
for(c=0;c<10;c++) {
pinMode(a[c],INPUT);
}
pinMode(13, OUTPUT);
digitalWrite(13, HIGH);
for(c=0;c<11;c++)
{
Tlc.set(c,1000);
b[c] = analogRead(a[c]);
delay(3500);
Tlc.update();
}
c=0;
for(c=0;c<9;c++) {
if (b[c] > f[c]) // record max
f[c] = b[c];
}
c=0;
for(c=0;c<9;c++) {
if (b[c] < e[c]) //record min val
e[c] = b[c];
}
c=0;
digitalWrite(13, LOW);//end of cal
}
#endif
yeah so thats just a normal libarry.
but yeah like i said just look at how ur using ur show() looks like a little mistake. i completely understand why that would work considering i know how a computer interputs. but that leads to problems just cause it compiles doesnt mean its write. see your LOGIC is right. its the implementation that needs fixing up. good route though good luck