User contributions
From ProgrammingExamples
(newest | oldest) View (newer 100 | older 100) (20 | 50 | 100 | 250 | 500)
- 15:53, 28 June 2010 (diff | hist) . . (+131) . . CPP
- 15:36, 28 June 2010 (diff | hist) . . (+782) . . N CPP/STL/SetDifference (Created page with '==SetDifference.cpp== <source lang="cpp"> #include <iostream> #include <list> #include <algorithm> #include <string> #include <iterator> template<class Coll> void print(const Co…')
- 15:36, 28 June 2010 (diff | hist) . . (+99) . . CPP (→STL Algorithms)
- 14:44, 28 June 2010 (diff | hist) . . (-380) . . Main Page
- 14:43, 28 June 2010 (diff | hist) . . (-597) . . Help:Editing
- 14:43, 28 June 2010 (diff | hist) . . (+595) . . N Help:DosAndDonts (Created page with '=== '''Do'''s and '''Don't'''s for using the Programming Examples Wiki === * '''Do''' ** Create a 'dispatch page' for each new language that you add, put links to examples in tha…') (current)
- 19:30, 27 June 2010 (diff | hist) . . (+126) . . User talk:Griswolf (current)
- 18:21, 27 June 2010 (diff | hist) . . (+191) . . User talk:Griswolf
- 07:09, 27 June 2010 (diff | hist) . . (+127) . . N User talk:Bench (Created page with 'I like the separation of "c-style" techniques. Keep up the good work! ~~~~') (current)
- 22:43, 26 June 2010 (diff | hist) . . (+229) . . N User talk:Griswolf (Created page with 'Griswolf - Good idea! I was planning to do this once we got some examples in these other languages, but you beat me to the punch! Keep the ideas and the additions coming! ~~~~')
- 22:42, 26 June 2010 (diff | hist) . . (+1,439) . . N WxWidgets (Created page with ' A C++ based toolkit that is primarily used to create nice graphics and GUIs. From their [http://www.wxwidgets.org/ Home Page]: <blockquote style="background-color: lightgrey; bo…')
- 22:42, 26 June 2010 (diff | hist) . . (-1,450) . . Main Page
- 14:38, 26 June 2010 (diff | hist) . . (+756) . . CPP/Switch (→Switch.cpp) (current)
- 09:11, 26 June 2010 (diff | hist) . . (+511) . . Main Page
- 08:42, 26 June 2010 (diff | hist) . . (+17) . . Main Page
- 12:52, 25 June 2010 (diff | hist) . . (+24) . . Main Page (→wxWidgets)
- 07:10, 25 June 2010 (diff | hist) . . (-64) . . CPP/ParallelSort (current)
- 21:27, 23 June 2010 (diff | hist) . . (+52) . . m User:Galik (current)
- 21:27, 23 June 2010 (diff | hist) . . (+162) . . N User:Galik (Created page with 'Hi Galik! Please take a look through the existing examples and clarify, comment, and add! Also feel free to create new examples! Thanks for your interest! Dave')
- 15:15, 23 June 2010 (diff | hist) . . (+1,486) . . N ProgrammingExamples:About (Created page with 'I am a frequent user of the c++ forum on daniweb.com (http://www.daniweb.com/forums/forum8.html). On this forum, at least once a week someone will ask "How do I sort an array?"…') (current)
- 10:22, 23 June 2010 (diff | hist) . . (+1,617) . . N User:Daviddoria (Created page with '== About me == My website: http://www.rpi.edu/~doriad/ My blog: http://daviddoria.blogspot.com/ == Why did I make this site? == I am a frequent user of the c++ forum on daniweb…') (current)
- 10:18, 23 June 2010 (diff | hist) . . (+170) . . N User talk:Nbaztec (Created page with 'Hi Nbaztec, It looks like you must use source lang="cpp" rather than simply 'source'. What are you trying to do? ~~~~') (current)
- 09:20, 23 June 2010 (diff | hist) . . (+72) . . Main Page (→Welcome to ProgrammingExamples.net!)
- 09:20, 23 June 2010 (diff | hist) . . (+621) . . N CPP/VariableNumberOfArguments (Created page with '==VariableNumberOfArguments.cpp== <source lang="cpp"> #include <iostream> #include <stdarg.h> void Function1(unsigned int num, ...); void Function2(unsigned int num, va_list ap)…') (current)
- 09:19, 23 June 2010 (diff | hist) . . (+74) . . Main Page (→C++)
- 09:19, 23 June 2010 (diff | hist) . . (+331) . . N CPP/Typedef (Created page with '==Typedef.cpp== <source lang="cpp"> #include <iostream> typedef std::pair<unsigned int, unsigned int> IndexPair; int main(int argc, char *argv[]) { IndexPair A; A.first = 2…') (current)
- 09:18, 23 June 2010 (diff | hist) . . (+26) . . Main Page (→C++)
- 09:18, 23 June 2010 (diff | hist) . . (+353) . . N CPP/STL/Tuple (Created page with '==Tuple.cpp== <source lang="cpp"> #include <iostream> #include <tuple> int main (int argc, char *argv[]) { std::tuple<int,char,std::string> tup( 4, 'c', std::string( "Hello W…') (current)
- 09:18, 23 June 2010 (diff | hist) . . (+25) . . Main Page (→STL Data Structures)
- 09:16, 23 June 2010 (diff | hist) . . (+353) . . N CPP/Switch (Created page with '==Switch.cpp== <source lang="cpp"> #include <iostream> using namespace std; int main(int argc, char *argv[]) { int test = 1; switch ( test ) { cout << "before cases" …')
- 09:15, 23 June 2010 (diff | hist) . . (+24) . . Main Page (→C++)
- 09:14, 23 June 2010 (diff | hist) . . (+665) . . N CPP/Classes/Singleton (Created page with '==Singleton.cpp== <source lang="cpp"> #include <iostream> class Log { public: static Log* Instance() { if (!instance) // Only allow one instance of class to be…')
- 09:14, 23 June 2010 (diff | hist) . . (+38) . . Main Page (→Classes)
- 09:14, 23 June 2010 (diff | hist) . . (+168) . . N CPP/Struct (Created page with '==Struct.cpp== <source lang="cpp"> #include <iostream> struct Card { int id; }; int main (int argc, char *argv[]) { Card c; c.id = 3; return 0; } </source>')
- 09:13, 23 June 2010 (diff | hist) . . (+24) . . Main Page (→C++)
- 09:13, 23 June 2010 (diff | hist) . . (+1,557) . . N CPP/StringStream (Created page with '==StringStream.cpp== <source lang="cpp"> #include <iostream> #include <string> #include <sstream> void StringToNumber(); void TestClear(); void NumberToString(); int main(int a…')
- 09:12, 23 June 2010 (diff | hist) . . (+36) . . Main Page (→C++)
- 09:12, 23 June 2010 (diff | hist) . . (+612) . . N CPP/Strings/Split (Created page with '==Split.cpp== <source lang="cpp"> #include <iostream> #include <sstream> #include <string> #include <algorithm> #include <iterator> #include <vector> int main(int argc, char *ar…')
- 09:11, 23 June 2010 (diff | hist) . . (+30) . . Main Page (→Strings)
- 09:10, 23 June 2010 (diff | hist) . . (+1,641) . . N CPP/STL/Sort (Created page with '==Sort.cpp== <source lang="cpp"> #include <iostream> #include <vector> #include <algorithm> void Standard(); void Descending(); void NonStandard(); struct Test { int a,b…')
- 09:09, 23 June 2010 (diff | hist) . . (+23) . . Main Page (→STL Algorithms)
- 09:09, 23 June 2010 (diff | hist) . . (+257) . . N CPP/IO/Setw (Created page with '==Setw.cpp== <source lang="cpp"> #include <iostream> #include <iomanip> using namespace std; int main(int argc, char* argv[]) { cout << "d: " << setw(15) << 5.42 << endl; c…') (current)
- 09:09, 23 June 2010 (diff | hist) . . (+38) . . Main Page (→I/O)
- 09:05, 23 June 2010 (diff | hist) . . (+555) . . N CPP/STL/RandomShuffle (Created page with '==RandomShuffle.cpp== <source lang="cpp"> #include <iostream> #include <algorithm> #include <vector> int main(int argc, char* argv[]) { std::vector<int> v; //add 10 integ…')
- 09:05, 23 June 2010 (diff | hist) . . (+66) . . Main Page (→STL Data Structures)
- 09:04, 23 June 2010 (diff | hist) . . (+1,534) . . N CPP/RandomNumbers (Created page with '==RandomNumbers.cpp== <source lang="cpp"> #include <iostream> #include <cstdlib> //drand48() #include <cstdio> #include <ctime> using namespace std; void RandomInts(); void Ran…')
- 09:04, 23 June 2010 (diff | hist) . . (+39) . . Main Page (→C++)
- 09:03, 23 June 2010 (diff | hist) . . (+9) . . Main Page
- 09:02, 23 June 2010 (diff | hist) . . (+797) . . N CPP/STL/PriorityQueue (Created page with '==PriorityQueue.cpp== <source lang="cpp"> #include <iostream> #include <queue> #include <vector> #include <cstdlib> #include <algorithm> double RandomDouble(); int main(int arg…')
- 09:01, 23 June 2010 (diff | hist) . . (+1,401) . . N CPP/STL/Queue (Created page with '==Queue.cpp== <source lang="cpp"> #include <iostream> #include <queue> #include <vector> #include <cstdlib> #include <algorithm> double RandomDouble(); void TestQueue(); void Fi…') (current)
- 09:01, 23 June 2010 (diff | hist) . . (+67) . . Main Page (→STL Data Structures)
- 08:56, 23 June 2010 (diff | hist) . . (+410) . . N CPP/Classes/PureVirtualFunction (Created page with '==PureVirtualFunction.cpp== <source lang="cpp"> #include <iostream> #include <limits> class Point { public: Point(const double xin, const double yin, const double zin) : x(xi…')
- 08:56, 23 June 2010 (diff | hist) . . (+60) . . Main Page (→Classes)
- 08:53, 23 June 2010 (diff | hist) . . (+889) . . N CPP/ParallelSort (Created page with '==ParallelSort.cpp== <source lang="cpp"> #include <iostream> #include <vector> #include <algorithm> #include <string> using namespace std; void StructMethod(); struct NumberNa…')
- 08:53, 23 June 2010 (diff | hist) . . (+37) . . Main Page (→C++)
- 08:52, 23 June 2010 (diff | hist) . . (+248) . . N CPP/STL/Pair (Created page with '==Pair.cpp== <source lang="cpp"> #include <iostream> #include <vector> #include <algorithm> int main (int argc, char *argv[]) { std::pair<double, int> a(3.4, 7); std::cout …') (current)
- 08:52, 23 June 2010 (diff | hist) . . (+23) . . Main Page (→STL Data Structures)
- 08:51, 23 June 2010 (diff | hist) . . (+1,704) . . N CPP/OverloadOperator (Created page with '==OverloadOperator.cpp== <source lang="cpp"> #include <iostream> class Point { private: double a; public: double x,y,z; Point(const double xin, const double yin, con…') (current)
- 08:51, 23 June 2010 (diff | hist) . . (+45) . . Main Page (→C++)
- 08:48, 23 June 2010 (diff | hist) . . (+344) . . N CPP/Classes/NestedClasses (Created page with '==NestedClasses.cpp== <source lang="cpp"> #include <iostream> class Parent { int name; class Child { int school; void test() { //std::cout << this->name;…') (current)
- 08:48, 23 June 2010 (diff | hist) . . (+47) . . Main Page (→Classes)
- 08:47, 23 June 2010 (diff | hist) . . (+449) . . N CPP/NAN (Created page with '==NAN.cpp== <source lang="cpp"> #include <iostream> #include <limits> using namespace std; bool IsNaN(const double a); int main(int argc, char *argv[]) { double a = nume…')
- 08:47, 23 June 2010 (diff | hist) . . (+33) . . Main Page (→C++)
- 08:46, 23 June 2010 (diff | hist) . . (+348) . . N CPP/Namespaces (Created page with '==Namespaces.cpp== <source lang="cpp"> #include <iostream> namespace Namespaces { double add(const double a, const double b) { return a + b; } } int main(int argc, c…')
- 08:44, 23 June 2010 (diff | hist) . . (+32) . . Main Page (→C++)
- 08:42, 23 June 2010 (diff | hist) . . (+666) . . N CPP/Math/MinMax (Created page with '==MinMax.cpp== <source lang="cpp"> #include <iostream> #include <cmath> int main(int argc, char *argv[]) { { double a = 10.3; double b = 5.8; std::cout << "Min: " << s…') (current)
- 08:42, 23 June 2010 (diff | hist) . . (+33) . . Main Page (→Math)
- 08:41, 23 June 2010 (diff | hist) . . (+249) . . N CPP/Math/Trig (Created page with '==Trig.cpp== <source lang="cpp"> #include <cmath> #include <iostream> int main() { double x1 = 0; double y1 = 0; double x2 = 100; double y2 = 100; std::cout << 180.…')
- 08:40, 23 June 2010 (diff | hist) . . (+170) . . N CPP/Math/Exponential (Created page with '==Exponential.cpp== <source lang="cpp"> #include <cmath> #include <iostream> int main() { std::cout << exp(4) << std::endl; //should be 54.598 return 0; } </source>') (current)
- 08:38, 23 June 2010 (diff | hist) . . (+95) . . Main Page (→C++0x)
- 08:36, 23 June 2010 (diff | hist) . . (+200) . . N CPP/Macros (Created page with '==Macros.cpp== <source lang="cpp"> #define SetMacro(name,type) \ void Set##name (type _arg) // run // gcc -E file.cpp // to see the precompiler output int main() { SetMacro(Te…') (current)
- 08:36, 23 June 2010 (diff | hist) . . (+24) . . Main Page (→C++)
- 08:35, 23 June 2010 (diff | hist) . . (+709) . . N CPP/Logging (Created page with '==Logging.cpp== <source lang="cpp"> #include <iostream> #include <fstream> using namespace std; void ChangeCoutDestination(); void LogToScreen(); void LogToFile(); int main() {…') (current)
- 08:34, 23 June 2010 (diff | hist) . . (+26) . . Main Page (→C++)
- 08:34, 23 June 2010 (diff | hist) . . (+50) . . Main Page (→C++0x)
- 08:31, 23 June 2010 (diff | hist) . . (+10) . . Main Page (→Debugging)
- 08:31, 23 June 2010 (diff | hist) . . (+34) . . N CPP/Assert (moved CPP/Assert to CPP/Debugging/Assert) (current)
- 08:31, 23 June 2010 (diff | hist) . . (0) . . m CPP/Debugging/Assert (moved CPP/Assert to CPP/Debugging/Assert)
- 08:31, 23 June 2010 (diff | hist) . . (+222) . . N CPP/Debugging/LineNumbers (Created page with '==LineNumbers.cpp== <source lang="cpp"> #include <iostream> using namespace std; int main(int argc, char *argv[]) { cout << "Line: " << __LINE__ << endl; cout << "File: " <…') (current)
- 08:30, 23 June 2010 (diff | hist) . . (+62) . . Main Page (→C++)
- 08:26, 23 June 2010 (diff | hist) . . (+616) . . N CPP/IO/FileOutput (Created page with '==FileOutput.cpp== <source lang="cpp"> #include <iostream> #include <fstream> void Overwrite(); void Append(); int main(int argc, char *argv[]) { Overwrite(); Append(); r…') (current)
- 08:24, 23 June 2010 (diff | hist) . . (+3,397) . . N CPP/IO/FileInput (Created page with '==FileInput.cpp== <source lang="cpp"> #include <iostream> #include <fstream> #include <vector> #include <string> #include <sstream> #include <cstdlib> void ReadInt(const std::st…')
- 08:23, 23 June 2010 (diff | hist) . . (+83) . . Main Page (→C++)
- 08:20, 23 June 2010 (diff | hist) . . (+1,091) . . N CPP/Infinity (Created page with '==Infinity.cpp== <source lang="cpp"> #include <iostream> #include <limits> bool IsInf(const double a); bool IsMinusInf(const double a); int main(int argc, char *argv[]) { …') (current)
- 08:19, 23 June 2010 (diff | hist) . . (+28) . . Main Page (→C++)
- 08:19, 23 June 2010 (diff | hist) . . (+274) . . N CPP/C++0x/Hash (Created page with '==Hash.cpp== <source lang="cpp"> #include <iostream> #include <functional> //hash int main(int argc, char* argv[]) { std::hash<const char*> H; std::cout << "foo -> " << H("…')
- 08:18, 23 June 2010 (diff | hist) . . (+40) . . Main Page (→STL Data Structures)
- 08:16, 23 June 2010 (diff | hist) . . (+334) . . N CPP/FunctionPointer (Created page with '==FunctionPointer.cpp== <source lang="cpp"> #include <iostream> using namespace std; void add(int a, int b); void DoThing(void (*pt2Func)(int,int)); int main(int argc, char …')
- 08:16, 23 June 2010 (diff | hist) . . (+43) . . Main Page (→C++)
- 08:15, 23 June 2010 (diff | hist) . . (+271) . . N CPP/Classes/FriendClass (Created page with '==FriendClass.cpp== <source lang="cpp"> #include <iostream> //forward declaration class B; class A { private: friend class B; int a; public: }; class B…')
- 08:14, 23 June 2010 (diff | hist) . . (+43) . . Main Page (→Classes)
- 08:12, 23 June 2010 (diff | hist) . . (+660) . . N CPP/Exceptions (Created page with '==Exceptions.cpp== <source lang="cpp"> #include <iostream> #include <fstream> using namespace std; int main() { try { // Statements that may throw exceptions you want t…') (current)
- 08:11, 23 June 2010 (diff | hist) . . (+32) . . Main Page (→C++)
- 08:11, 23 June 2010 (diff | hist) . . (+430) . . N CPP/Enum (Created page with '==Enum.cpp== <source lang="cpp"> #include <iostream> enum PointType { GOOD, BAD, UNINFORMATIVE }; int main(int argc, char *argv[]) { PointType A = GOOD; if(A == GOOD) …')
- 08:10, 23 June 2010 (diff | hist) . . (+20) . . Main Page (→C++)
- 08:09, 23 June 2010 (diff | hist) . . (+43) . . Main Page (→Classes)
- 08:08, 23 June 2010 (diff | hist) . . (+1,247) . . N CPP/Loops/DoWhile (Created page with '==DoWhile.cpp== <source lang="cpp"> #include <iostream> #include <string> #include <cstdlib> #include <sstream> #include <fstream> int main(int argc, char *argv[]) { if(argc !…') (current)
- 08:08, 23 June 2010 (diff | hist) . . (+100) . . Main Page (→Classes)
- 08:06, 23 June 2010 (diff | hist) . . (+798) . . N CPP/Classes/DerivedClass (Created page with '==DerivedClass.cpp== <source lang="cpp"> #include <iostream> #include <string> class Person { public: std::string Name; Person(){} }; class Child : public Per…') (current)
- 08:06, 23 June 2010 (diff | hist) . . (+45) . . Main Page (→Classes)
(newest | oldest) View (newer 100 | older 100) (20 | 50 | 100 | 250 | 500)