Search
 
SCRIPT & CODE EXAMPLE
 

CPP

C++ (gcc 8.3) sample

#include <iostream>
using namespace std; // consider removing this line in serious projects
 
int main() {
	int intNum = 0;
 
	cin >> intNum;
	while (intNum != 42) {
		cout << intNum << "
";
		cin >> intNum;
	}
 
	return 0;
}
Comment

C++14 (gcc 8.3) sample

#include <iostream>
using namespace std; // consider removing this line in serious projects
 
int main() {
	auto func = [] () {
		int intNum = 0;
		cin >> intNum;
		while (intNum != 42) {
			cout << intNum << "
";
			cin >> intNum;
		}
	};
	func();
 
	return 0;
}
Comment

PREVIOUS NEXT
Code Example
Cpp :: apertura file in c++ 
Cpp :: turbo c++ easy programs 
Cpp :: kruskal algorithm 
Cpp :: setFontSize QT 
Cpp :: how to print double value up to 9 decimal places in c++ 
Cpp :: mpi wait 
Cpp :: what does map.count() return in c++ 
Cpp :: string in int in cpp 
Cpp :: is obje file binary?? 
Cpp :: c++ argument list for class template is missing 
Cpp :: how to change the icon of an exe in c++ 
Cpp :: how to use mersenne_twister_engine in c++ to generate random numbers 
Cpp :: sjfoajf;klsjflasdkfjk;lasjfjajkf;dslafjdjalkkkjakkkkkkkkkkkkkkkkfaWZdfbhjkkkk gauds 
Cpp :: how to save system function output into a variable in c++ 
Cpp :: number of characters in string 
Cpp :: a suprise... c++ 
Cpp :: c++ hide credentials 
Cpp :: c++ multiple if conditions 
Cpp :: play roblox vr on quest 2 
Cpp :: fsafdsfdsaf 
Cpp :: c++ find unused class methods 
Cpp :: 1/2(-3-3)(-3+4) 
Cpp :: char to binary 
Cpp :: all in one c++ 
Cpp :: c++ insert vector into vector 
Cpp :: c pointer syntax 
Cpp :: auto keyword 
Cpp :: for in c++ example 
Cpp :: 2d stl array 
Cpp :: font family slick 
ADD CONTENT
Topic
Content
Source link
Name
2+1 =