Rewrite the code every time you want to port it to a new operating system?
Die Idee finde ich doch ganz sinnvoll.[/IRONIE]
Nun gut, solange ich weiß, dass ich auf einer 32bit Maschine kompiliere und ich nicht vorhabe meinen Code weiter zu verbreiten, solange kann ich auf diesen Datentyp ja verzichten, auch wenn es schlechter Stil ist.
Nicht unbedingt. Bei mir ist long 4Bytes groß (sizeof()). Hängt stark von dem verwendeten Compiler ab.
EDIT: long long wäre 8Bytes groß. Was ja dann auch logisch ist. Mit unsigned long long könnte man also auf den Windows-Datentyp verzichten. Jedoch wäre das auf einer 32Bit Maschine Speicherverschwendung.
The standard does not specify the size in bytes, but it specifies minimum ranges that various integral types must be able to hold. You can infer minimum size in bytes from it.
Minimum ranges guaranteed by the standard (from "Integer Types In C and C++"):
signed char: -127 to 127
unsigned char: 0 to 255
"plain" char: -127 to 127 or 0 to 255 (depends on default char signedness)
signed short: -32767 to 32767
unsigned short: 0 to 65535
signed int: -32767 to 32767
unsigned int: 0 to 65535
signed long: -2147483647 to 2147483647
unsigned long: 0 to 4294967295
signed long long: -9223372036854775807 to 9223372036854775807
unsigned long long: 0 to 18446744073709551615
Actual platform-specific range values are found in <limits.h> in C, or <climits> in C++ (or even better, templated std::numeric_limits in <limits> header).
C++ Winapi FindWindow Problem 01/27/2011 - C/C++ - 0 Replies Hi,
hab folgendes Problem:
Will ein Fenster umbennen, das will aber nicht wirklich.
#include <Windows.h>
#include <iostream>
using namespace std;
int main()
{
[C++]FindWindow findet nichts. 09/13/2010 - C/C++ - 18 Replies http://www.paste-code.com/paste.php?id=kbC95ZHRry
Aber sobald ich zum Beispiel :
FindWindow(NULL,"PVP.net-Client") angebe, findet er es und gibt mir dann die HWND aus.
Wo liegt das problem?
Ich hab es auch schon so:
FindWindow("\\„League of Legends\\“-Startprogramm - 1,0,0,31 - ", NULL); versucht, geht trozdem nicht :/
FindWindow parameter richtig nutzen... 06/15/2010 - General Coding - 14 Replies HWND xxx = FindWindow(NULL ,"XXX");
ShowWindow(xxx, SW_RESTORE);
FindWindowW': Konvertierung des Parameters 2 von 'const char ' in 'LPCWSTR' nicht möglich
<<
Diese meldung beim compilen
Kal FindWindow help 12/15/2008 - Kal Online - 2 Replies yup, what the title is saying, i'm trying to find the window of kalonline ... but failed.... dont work idk why, name is correct.... hope someone can help
Source:
// Basic Include's
#include <windows.h>
#include <iostream>
// The Namespace