[c++] talent?
-
Guten Morgen liebe Community. Hmm ich bin irgendwie frustriert weill einfach nichts klappt mit C++.
Ich hab jetzt alles durch mit C++ ausser Klassen und fortgeschrittene Themen wie stl.... Wenn ich mir jetzt diesen Code hier anschaue:}
#include "..\..\include\hge.h"
HGE *hge = 0;
// This function will be called by HGE once per frame.
// Put your game loop code here. In this example we
// just check whether ESC key has been pressed.
bool FrameFunc()
{
// By returning "true" we tell HGE
// to stop running the application.
if (hge->Input_GetKeyState(HGEK_ESCAPE)) return true;// Continue execution
return false;
}int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{
// Here we use global pointer to HGE interface.
// Instead you may use hgeCreate() every
// time you need access to HGE. Just be sure to
// have a corresponding hge->Release()
// for each call to hgeCreate()
hge = hgeCreate(HGE_VERSION);// Set our frame function
hge->System_SetState(HGE_FRAMEFUNC, FrameFunc);// Set the window title
hge->System_SetState(HGE_TITLE, "HGE Tutorial 01 - Minimal HGE application");// Run in windowed mode
// Default window size is 800x600
hge->System_SetState(HGE_WINDOWED, true);// Don't use BASS for sound
hge->System_SetState(HGE_USESOUND, false);// Tries to initiate HGE with the states set.
// If something goes wrong, "false" is returned
// and more specific description of what have
// happened can be read with System_GetErrorMessage().
if(hge->System_Initiate())
{
// Starts running FrameFunc().
// Note that the execution "stops" here
// until "true" is returned from FrameFunc().
hge->System_Start();
}
else
{
// If HGE initialization failed show error message
MessageBox(NULL, hge->System_GetErrorMessage(), "Error", MB_OK | MB_ICONERROR | MB_APPLMODAL);
}// Now ESC has been pressed or the user
// has closed the window by other means.// Restore video mode and free
// all allocated resources
hge->System_Shutdown();// Release the HGE interface.
// If there are no more references,
// the HGE object will be deleted.
hge->Release();return 0;
}..kapier ich fast nix ausser vielleicht include und instanzen..
aber mehr auch nicht.
Brauch man fürs programmieren talent und ich hab das nicht?
C++ ist die einzige Sprache die ich kann d.h. das ich direkt mit c++ eingestiegen bin.MfG
amidamaru
-
hm, lol, den code versteh sogar ich und ich bin nichmal c++ programmierer.
vielleicht solltest du dir mal ne andere sprache zum programmieren lernen anschauen. pascal oder python oder so.
-
Was gibts da zu kapieren? Du weißt was Funktionen sind, du weißt was Zeiger sind und du weißt was Klassen sind. Sicher dass du Probleme hast den Code zu verstehen?
Was die Funktionsaufrufe machen steht doch in den Kommentaren.
-
Ich schätze mal das Posting ist aus einem anderen Forum kopiert sonst würde da nicht um 18 Uhr "Guten Morgen" stehen.