Zum Inhalt springen

loopi123

Mitglieder
  • Gesamte Inhalte

    9
  • Benutzer seit

  • Letzter Besuch

Alle Inhalte von loopi123

  1. :cool: ja das stimmt, aber deine Lösung scheint mir auch sehr einleuchtend... doch leider versteh ich nicht alles... wieso machst du asprintf und nicht printf..? und wieso gibt es mir eine fehlermeldung wie folgt? [C++ Fehler] Unit1.cpp(469): E2268 Aufruf der undefinierten Funktion 'asprintf' obwohl ich oben #include <stdio.h> deklariert habe? gruss loopi
  2. sorry aber das klappt irgendwie nicht :eek:rolleyes: im moment habe ich das problem so "gelöst" void __fastcall TForm1::Timer10Timer(TObject *Sender) { using namespace std; time_t Zeitstempel; tm *nun; Zeitstempel = time(0); nun = localtime(&Zeitstempel); ofstream cout; cout.open("Logfile_"__DATE__".txt", ofstream::out | ofstream::app); ich weiss.... es ist nicht einfach, wenn man keine ahnung hat
  3. so etwas? ofstream cout; cout.open("logfile " + inttostr(localtime) + ".csv", ofstream::out | ofstream::app); greetz loopi
  4. was gäbe es für eine Variante?
  5. ja das ist mir bewusst.:cool: so kann man pro tag ein logfile erstellen aber DAS Problem hat sich gelöst. greetz loopi
  6. ist das so nicht möglich? void __fastcall TForm1::Timer9Timer(TObject *Sender) { using namespace std; PerformanceGraph1->DataPoint(clRed,Data1); PerformanceGraph1->DataPoint(clBlue,Data2); PerformanceGraph1->DataPoint(clYellow,ReadAllDigital()*15); PerformanceGraph1->Update(); ofstream cout; cout.open("logfile "__DATE__".csv", ofstream::cout | ofstream::app); cout << "Datum,"; cout << "Zeit,"; cout << "Data1," ; cout << "Data2"<< endl ; cout << __DATE__","; cout << __TIME__","; cout << "Wert vom Data1,"; cout << "Wert vom Data2"<<endl; cout.close(); } //---------------------------------------- Fehlermeldung: [C++ Fehler] Unit1.cpp(392): E2451 Undefiniertes Symbol 'cout' kann ich das nicht definieren? wenn ja-->wo?:confused:
  7. hi Bubble. Danke für deinen Eintrag. Ich habe leider ein grösseres Brett vor dem Kopf...:upps bevor ich mich hier weiter in Probleme:old könnte ein netter User mir einen Lösungsansatz vorschlagen.:confused: p.s. würde sogar das Projekt zur Verfügung stellen Ich werde wohl nie Programmierer....:helau: greetz loopi
  8. das ist auch das Problem. Ich weiss nicht wie und wo ich das Programm einbinden soll, dass es auch die "richtige" Fehlermeldung anzeigt. Ich versuche das ganze in die If anweisung einzubinden...? void __fastcall TForm1::Button2Click(TObject *Sender) { stop=!stop; if (stop){ Button2->Caption = "Break"; Timer9->Enabled =true; Label24->Visible = true; using namespace std; int main() { ofstream cout; cout.open("logfile "__DATE__".csv"); cout << "Datum,"; cout << "Zeit,"; cout << "Data1," ; cout << "Data2"<< endl ; cout << __DATE__","; cout << __TIME__","; cout << "Wert vom Data1,"; cout << "Wert vom Data2"<<endl; cout.close(); return 0; } } else { Button2->Caption = "Run"; Timer9->Enabled =false; Label24->Visible = false; } } //--------------------------------------------------------------------------- und #include <fstream> #include <iostream> #include <time.h> habe ich im Kopf des Prog. eingefügt.... ist das korrekt? Könntest du mir ein mal ein zusammengefasstes Beispiel schreiben? gruss loopi
  9. Hallo zusammen. Ich bin ein Neuling auf dem Gebiet Programmieren. Jedoch habe ich schon ziehmlich etwas Programmiert. Mein Programm läuft einwand frei, doch mit dem einbinden der Protokolldatei klappt es nicht so ganz. Mein Graph wird von einem Button aus gestartet der im Intervall vom Timer9 aktualisiert wird. void __fastcall TForm1::Timer9Timer(TObject *Sender) { PerformanceGraph1->DataPoint(clRed,Data1); PerformanceGraph1->DataPoint(clBlue,Data2); PerformanceGraph1->DataPoint(clYellow,ReadAllDigital()*15); PerformanceGraph1->Update(); } //--------------------------------------------------------------------------- void __fastcall TForm1::Button2Click(TObject *Sender) { stop=!stop; if (stop){ Button2->Caption = "Break"; Timer9->Enabled =true; Label24->Visible = true; } else { Button2->Caption = "Run"; Timer9->Enabled =false; Label24->Visible = false; } } //--------------------------------------------------------------------------- nun möchte ich diesne Simplen Quelltext ins Prog integrieren. und im gleichen intervall wie der timer9 aktualisieren #include <fstream> #include <iostream> #include <time.h> using namespace std; int main() { ofstream cout; cout.open("logfile "__DATE__".csv"); cout << "Datum,"; cout << "Zeit,"; cout << "Data1," ; cout << "Data2"<< endl ; cout << __DATE__","; cout << __TIME__","; cout << "Wert vom Data1,"; cout << "Wert vom Data2"<<endl; cout.close(); return 0; } Als einzelnes Prog klappt es gut, doch das mit dem einbinden und deklarieren... naja... kann mir jemand helfen? Mfg Loopi

Fachinformatiker.de, 2024 by SE Internet Services

fidelogo_small.png

Schicke uns eine Nachricht!

Fachinformatiker.de ist die größte IT-Community
rund um Ausbildung, Job, Weiterbildung für IT-Fachkräfte.

Fachinformatiker.de App

Download on the App Store
Get it on Google Play

Kontakt

Hier werben?
Oder sende eine E-Mail an

Social media u. feeds

Jobboard für Fachinformatiker und IT-Fachkräfte

×
×
  • Neu erstellen...