
homoeolin
QT-Freak
Nachdem ich QT Tabellen geschaffen habe, tauchen neue Probleme mit Variablen auf.
Dieses Problem hatte ich aber schön öfters und bitte euch deshalb um Hilfe.
Ich erhalte folgende Meldung beim compilieren:
g++ -c -pipe -Wall -W -O2 -DNO_DEBUG -I/usr/local/qt/include -I/usr/local/qt/include -o main.o main.cpp
main.cpp: In function `void save()':
main.cpp:49: `500' cannot be used as a function
main.cpp:51: `4' cannot be used as a function
main.cpp:54: implicit declaration of function `int text(...)'
main.cpp:55: `outStream' undeclared (first use this function)
main.cpp:55: (Each undeclared identifier is reported only once
main.cpp:55: for each function it appears in.)
make: *** [main.o] Fehler 1
Die 4 und 500 sind die numROWS und numCOLS-Variablen.
Sie dienen als Spalten und Zeilen-anzahl Angaben.
Im Code werden diese wie folgt eingefügt:
const int numRows = 500; // Tablesize: number of rows
const int numCols = 4; // Tablesize: number of columns
int main()
{
(...)
}
Die Variablen möchte ich in einer eingenen Funktion nutzen und in
main() !
Ich hoffe ihr könnt mir helfen ...
Tobias
Wenn ihr euch über den Quellcode stürtzen wollt , liegt er als Anhang vor !
(er ist noch sehr primitiv...)
Quellcode als Anhang und
hier: http://www.doun.de/tabellen.tar.gz

Dieses Problem hatte ich aber schön öfters und bitte euch deshalb um Hilfe.
Ich erhalte folgende Meldung beim compilieren:
g++ -c -pipe -Wall -W -O2 -DNO_DEBUG -I/usr/local/qt/include -I/usr/local/qt/include -o main.o main.cpp
main.cpp: In function `void save()':
main.cpp:49: `500' cannot be used as a function
main.cpp:51: `4' cannot be used as a function
main.cpp:54: implicit declaration of function `int text(...)'
main.cpp:55: `outStream' undeclared (first use this function)
main.cpp:55: (Each undeclared identifier is reported only once
main.cpp:55: for each function it appears in.)
make: *** [main.o] Fehler 1
Die 4 und 500 sind die numROWS und numCOLS-Variablen.
Sie dienen als Spalten und Zeilen-anzahl Angaben.
Im Code werden diese wie folgt eingefügt:
const int numRows = 500; // Tablesize: number of rows
const int numCols = 4; // Tablesize: number of columns
int main()
{
(...)
}
Die Variablen möchte ich in einer eingenen Funktion nutzen und in
main() !
Ich hoffe ihr könnt mir helfen ...
Tobias
Wenn ihr euch über den Quellcode stürtzen wollt , liegt er als Anhang vor !
(er ist noch sehr primitiv...)
Quellcode als Anhang und
hier: http://www.doun.de/tabellen.tar.gz

Anhänge
Zuletzt bearbeitet: