Varyemez
Hectopat
Daha fazla
- Cinsiyet
- Erkek
- Meslek
- Lise Öğrencisi
Merhaba, mesela bir koşul sağlandığında GCC'de derleme işleminin durdurulup hata mesajı (error) vermesini nasıl sağlarız?
C++:
//Main.cpp
#include <GLFW/glfw3.h>
#include "PencereAc.h"
int main () {
GameWindow.Width = 800;
GameWindow.Heigth= 450;
return 0;
}
C++:
//PencereAc.h
#include <GLFW/glfw3.h>
struct GameWindow {
int Width, Heigth;
bool Resizable = true;
bool Fullscreen = false;
void Create() {
DetectErrors();
}
void DetectErrors () {
if (Fullscreen && Resizable)
//Derleme işlemi durdurulur ve hata mesajı sergilenir.
}
};
GameWindow GameWindow;