Latest C++ Code Snippets

Popular / Snippets

Maluda created a Page  -  Nov 06, 2015
1 118 

Commands: !join Channel !leave Channel !ajoin add Channel !ajoin del Channel

 Respond   mIRC  
berend created a Page  -  Jan 17, 2013
1 372 

Building an ZNC module for #centravi on onlinegamesnet.

  1 Thread   C++  
ImArrow created a Page  -  Jul 18, 2012

got a little bored and thought i would make something useless to simply show my method it handles 3 coord systems. sphere , rectangular and cylinder systems.

 Respond   C++  
ImArrow created a Page  -  May 01, 2012

A dynamic array is an array data structure that can be resized and which allows elements to be added or removed.

sunslayer created a Page  -  Feb 22, 2011

prevents the screen from closing after the program is finished this is small but incredibly useful, especially if your IDE doesn't have have support for this

 Respond   C++  
sunslayer created a Page  -  Feb 21, 2011

calculates the standard devation and variances of the given data set and determines whether a number is an outlier in the set

  5 Threads   C++  
sunslayer created a Page  -  Feb 15, 2011

haven't touched C++ for almost a year so I'm a bit rusty but this is basically in C++

  5 Threads   C++  
Soubi created a Page  -  Dec 20, 2010

You put it in your calculator and it displays the periodic table.

  2 Threads   C++  
N3M3S1S created a Page  -  Oct 10, 2010

CD tray opener I made for mIRC DeluXe 1.5.82+. In mIRC DeluXe you press F5 (or select it from the popup menus) and it launched the program and opens the CD tray, you place in or remove the CD and press any key, the CD tray closes and program exits. Windows then takes the necessary action i.e. auto play, or choose action etc. You can use it in your mIRCs or programs!

 Respond   C++  
N3M3S1S created a Page  -  Oct 05, 2010

Simple console dice roller made in C++

  4 Threads   C++  
Soubi created a Page  -  Oct 01, 2010

Hawkee doesnt have the Platform that this is really written on, so i just put " C++ " again. The real code is in a from of basic(TI).This program draws a Series or Parallel circuit..just depends on which one you are doing. Each circuit has 2 resistors. a Amp gauge, and so forth, it calculates the amount of electricty that can flow through through the circuit, without you blowing it. :D enjoy those..

 Respond   C++  
Soubi created a Page  -  Sep 30, 2010

^^ Besides mIRC code, I also program the TI83,TI84 calculators.I put the Platform as C++ Because i don't know what this code language is..kinda sad because i know how to code it, but anywho. This program calculates the percent of error in a measurment. When you take a measurment, there is an exact measurment and your measurment, which is a estimate, and there is a percent of error that you will have...

  4 Threads   C++  
wade2462 created a Page  -  May 26, 2010

A ROT13 function that uses a switch. Simply pass in a string and get the modified string back. wait.h is simply a header I wrote to suspend the program using cin.get();

  2 Threads   C++  
wade2462 created a Page  -  May 25, 2010

Function to copy one array to another with bounds checking. It does work with all types. Copy this code into a header file called ArrayCopy.h. In main file code do this.

  4 Threads   C++  
Sonny created a Page  -  May 16, 2010

A hangman game based around references, also uses a base class as the body of the game, and nested classes for parts of the game. there are a few bugs, but they aren't annoyingly noticeable. i'll fix whatever you can find.

  3 Threads   C++  
Sonny created a Page  -  May 14, 2010
Sonny created a Page  -  May 13, 2010

A simplified blackjack game played in a console window. This project is from a Mike Dawson book, so the source code is not 100% original. But with a few personal tweaks and some tidy-ups, the program is quite fun when you're bored. Very very basic AI, which tells the computer when it's a good idea to hit, and when it's a good idea to decide if an Ace is valued as 1 or 11.

  3 Threads   C++  
Sonny created a Page  -  May 12, 2010

A simple tic tac toe game using pointers. Just a simple example of how you can use pointers. Simple AI, as well. This was just a project i had to do when i first learned pointers.

  4 Threads   C++  
AlexRapso created a Page  -  Apr 27, 2010

TicTacToe game i made for a university project, has a pointless 10x10 square which i had to make but all the rest is good.

Sonny created a Page  -  Apr 25, 2010

Just a basic example of a sorttok() function using the STL algorithm sort() and vectors.. It sorts in the order of symbol, number, letter. Just an example, I don't plan to add onto it.

 Respond   C++  
Sonny created a Page  -  Apr 24, 2010

A very basic gettok() function i made from scratch for a contest.It's not to be used with loops, since it uses substr. Hasn't been fully tested, but works as needed in my experience. Post bugs, if you find any. I'll probably finish all the other tokens, if and when I have time.

 Respond   C++  
Sonny created a Page  -  Apr 24, 2010

A very basic multiplication table former. It asks you to enter a number, then displays a 5x5 grid-like multiplication table with the base number you entered. It starts from 1. Useful for teaching younger kids their times tables, or people who aren't so good with multiplication. You can use it from the command line, I would recommend maximizing your screen when using big numbers. Command line usage: Windows:..

  3 Threads   C++  
Sonny created a Page  -  Apr 24, 2010
1 926 

old game I wrote. This was probably the first or second game I wrote using random numbers and enumerated types. The computer picks a number, and you try to guess it. Very basic and simple, but it was a beginner project. Now, looking back, I could think of a million ways to rewrite this game, with 100 more features and far more memory efficient. This is just an example code, all in all. So, if you..

  8 Threads   C++  
Sonny created a Page  -  Apr 22, 2010

A simple function to check if a number is a prime or not. It will return true or false.

  7 Threads   C++  
miniCruzer created a Page  -  Apr 18, 2010
1 528 

This was one of my first projects that I made a LONG time ago, and now that I look at it, it's kinda stupid. I thought I'd post it here because at one point it compiled. This is straight out of the compiled source, and I haven't touched it in years. Looking back, I wish I would have known how to write to text files.

  1 Thread   C++  
awkwardsaw created a Page  -  Mar 07, 2010

this is my first c++ program, its pretty simple :p

Suhana created a Page  -  Dec 14, 2009

It's fairly common practice these days for web sites that require simple user authentication to store the users passwords in a hashed form rather than plain text.

 Respond   C++  
A^1^T^E^A^M created a Page  -  Dec 08, 2009

Ok. I have this problem for homework, I soluble it and will post it here, such as my next problems and programs.

 Respond   C++  
Rolo created a Page  -  Nov 26, 2009

This is my solution to Chapter 5 exercise 8 of "C Primer Plus: 5th Edition" Aside from that, it's a handy program to have around, as temperature conversions always annoy me for some reason.

BrAndo created a Page  -  Nov 01, 2009

used to tell if a number is prime

 Respond   C++  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.