bin zu blöd fürn hello world in VS 05

Dieses Thema im Forum "Programmierung & Entwicklung" wurde erstellt von Rend, 22. Juni 2006 .

Schlagworte:
Status des Themas:
Es sind keine weiteren Antworten möglich.
  1. 22. Juni 2006
    also ich versuch schon seit ein paar tagen ein hello world gebackenb zu bekommen aber ich seh nicht durch. Ich mach das in VS 05 in einer Windows Form. So mein Problem is jetz. Ich weiß nicht wo ich da den code reinschreiben muss. Also wenn ich doppelgeklickt hab auf die Form seh ich ja den code und da steht dan nschon folgendes:

    Code:
     #pragma once
    
    
    namespace ha {
    
     using namespace System;
     using namespace System::ComponentModel;
     using namespace System::Collections;
     using namespace System::Windows::Forms;
     using namespace System::Data;
     using namespace System::Drawing;
    
     /// <summary>
     /// Summary for Form1
     ///
     /// WARNING: If you change the name of this class, you will need to change the
     /// 'Resource File Name' property for the managed resource compiler tool
     /// associated with all .resx files this class depends on. Otherwise,
     /// the designers will not be able to interact properly with localized
     /// resources associated with this form.
     /// </summary>
     public ref class Form1 : public System::Windows::Forms::Form
     {
     public:
     Form1(void)
     {
     InitializeComponent();
     //
     //TODO: Add the constructor code here
     //
     }
    
     protected:
     /// <summary>
     /// Clean up any resources being used.
     /// </summary>
     ~Form1()
     {
     if (components)
     {
     delete components;
     }
     }
    
     private:
     /// <summary>
     /// Required designer variable.
     /// </summary>
     System::ComponentModel::Container ^components;
    
    #pragma region Windows Form Designer generated code
     /// <summary>
     /// Required method for Designer support - do not modify
     /// the contents of this method with the code editor.
     /// </summary>
     void InitializeComponent(void)
     {
     this->SuspendLayout();
     // 
     // Form1
     // 
     this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
     this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
     this->ClientSize = System::Drawing::Size(292, 266);
     this->Name = L"Form1";
     this->Text = L"Form1";
     this->Load += gcnew System::EventHandler(this, &Form1::Form1_Load);
     this->ResumeLayout(false);
    
     }
    #pragma endregion
     private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) {
     }
     };
    }
    
    Dass das wo die backslashes vor snd nicht zum code zählt weiß ich auch, aber wo muss ich denn nun diesen code engeben für das hello world? :

    Code:
     #include <iostream.h>
    
    int main()
    {
     cout << "Hello World!\n";
     return 0;
    }
    plz help ich komm einfach nicht klar.
     
  2. 22. Juni 2006
    du musst die vorkommpelierte header ausschalten bei VST 06 machte man das mit Alt+f7 c++
    dann vorkomepierte header abschalten bei deinem Hello world Pro habe ich folgendes verbessert
    Code:
    #include <iostream.h>
    
    int main(void)
    {
     cout << "Hello World!\n"<< endl;
     return 0;
    }
    
    
    
    
    
    
    
    
    
    
    
    
     
  3. 22. Juni 2006
    mh klappt irgendwie net. also erstmal muss ich des irgendwie für jedes projekt extra einstellne und zweitens is danach trotzdem das ganze noch da. :baby:
     
  4. 22. Juni 2006
    Code:
    #include <iostream.h>
    #include <conio.h>
    
    using namespace std;
    int main ()
    {
    cout <<"Hello World"!<<endl;
    getch (); //Include conio.h -> Dafür da, dass sich das Fenster nach der Ausgabe nicht wieder schließt
    return 0;
    }
     
  5. 22. Juni 2006
    versuchs mal mit

    #include <iostream>
    using namespace std;

    int main(void)
    {
    cout << "Hello World!\n"<< endl;

    getchar();
    return 0;
    }
    Unter Porjekt Eigenschaften\ c++ \Vorkomelierte Header musst du einstellen nicht verwenden
    habs unter visual studio 2003 ausprobiert
     
  6. 22. Juni 2006
    also mein problem is jetz nich wirklich das hello world ^^ sondern ich wei0ß nicht wohin mit dem code beim obigen ^^

    ähm und naja ivch probiers nochmal mit dem header bei mir is zuwatr englisch aber ich bin der meinung ich habn trotzdem gefunden mh ma schauen
     
  7. 22. Juni 2006
    Hi...

    ich hab mal eben nen Projekt erstellt und Screenies gemacht...damit sollte es klappen.

    Zuerst musst du nen Consolen-Projekt erstellen, da es sich bei deinem Code um ne Consolen Anwendung handelt.

    {bild-down: http://sinus.drition.net/tutBilder/consolen_projekt.PNG}



    Danach in den Eigenschaften folgendes auswählen
    {bild-down: http://sinus.drition.net/tutBilder/consolen_Anwendungseinstellungen.PNG}



    Nun musst du dem Projekt nen neues Element hinzufügen. Das geht so:
    {bild-down: http://sinus.drition.net/tutBilder/neues_element.PNG}


    Dort wählst du folgendes aus:
    {bild-down: http://sinus.drition.net/tutBilder/neues_element2.PNG}



    Dann musst du nur noch folgenden Code einfügen:
    Code:
    #include <iostream>
    
    using namespace std;
    
    int main()
    {
     cout << "Hello World!\n";
     system("Pause");
     return 0;
    }
    
    Hier dann das Ergebnis:
    {bild-down: http://sinus.drition.net/tutBilder/ergebnis.PNG}




    Hoffe ich konnte helfen...10er wäre nett.

    Mfg
    Sinus2K
     
  8. 22. Juni 2006
    juchuh ich danke dir ^^ sinus2k. Ich frag mich nur warum des so kompliziert sein muss ^^

    so damit ist hier dicht

    10er habt ihr alle

    mfg
     
  9. Video Script

    Videos zum Themenbereich

    * gefundene Videos auf YouTube, anhand der Überschrift.