This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <windows.h> | |
using namespace std; | |
int main() { | |
HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE); | |
// you can loop k higher to see more color choices | |
for(int k = 0; k <= 255; k++) { | |
// pick the colorattribute k you want |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#define MAXCONSOLEINPUTS 20 | |
//This is the input module. It can handle not only Mouse but keyboard also. | |
HANDLE rHnd, wHnd; //Handles for reading and writing to the console. | |
//The Mouse Handle function. Or to be more precise, the pointer to the function | |
int (*handler) (int x, int y, int button,int state); | |
int initializecontrols(); | |
int addmousehandler(int (*func) (int x, int y, int button,int state)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
int main() { | |
char* dados = NULL; | |
int input1 = 0, convert = 0, i; | |
double result1 = 0.0; | |
char erro[50] = {'\n'}; | |
char select[7][70] = {'\n'}; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <ctype.h> | |
#include <string.h> | |
int main() { | |
int i; | |
char *dados = NULL; | |
char theWord[50] = {'\n'}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <time.h> | |
#define QTDNUMBERS 5 | |
void getName(char[], char[]); | |
int main() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
int main() { | |
// 0 = não jogado | |
// 1 = jogado o "O" | |
// 2 = jogado o "X" | |
char* dados = NULL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <errno.h> | |
#define MAXPIXELSTRING 71910 | |
#define MAXPIXEL 4794 | |
int main() { | |
int i = 0; | |
int j, k; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "SDL.h" | |
#include <windows.h> | |
int main(int argc, char *argv[]) { | |
const SDL_MessageBoxButtonData buttons[] = { | |
{ /* .flags, .buttonid, .text */ 0, 0, "no" }, | |
{ SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT, 1, "yes" }, | |
{ SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT, 2, "cancel" }, | |
}; | |
const SDL_MessageBoxColorScheme colorScheme = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int f1(int n) { | |
return n * 3; | |
} | |
int f2(int f(int), int n) { | |
return f(n) - 2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <string> // std::string | |
#include <iostream> // std::cout | |
#include <sstream> // std::ostringstream | |
using namespace std; | |
template <typename T> | |
string to_string ( T Number ) { | |
string Result; | |
ostringstream convert; |
OlderNewer