49,757 Topics

Member Avatar for
Member Avatar for ShawnCplus

This is the first program I wrote, well besides Hello world. I put about a lot of hours into this code, it started as a divisional calculator than i evolved it so it would ask your name and calculate your average and i was messing around with the system ("") …

Member Avatar for ShawnCplus
0
878
Member Avatar for vegaseat

Quick and dirty way to change your console program colors using DOS command "Color BackgroundForeground" where Background is hex 0 = black to F = white, dito for Foreground.

1
286
Member Avatar for vegaseat

Just a simple way to separate the words contained in a sentence. As an option you can store the words in a vector. If you are not familiar with a vector, use an array instead.

0
189
Member Avatar for Mahen

Chargen is a program created entirely by mahen of Mauritius. The simple task of Chargen is to generate characters, but the most important aspect of this particular program is it's abillity to process user input. Due to the way the program was programmed, any input that the user will make …

0
343
Member Avatar for VSBrown

A program that reads in two integers and determines an prints if the first is a multiple of the second.

0
191
Member Avatar for VSBrown

A program used to calculate each employee's pay based on that employee's paycode.

Member Avatar for freckman1981
0
2K
Member Avatar for VSBrown

A program that inputs three integers from the keyboard and prints the sum, average, product, smallest and largest of these numbers.

0
196
Member Avatar for VSBrown

Find all Pythagorean triples for side1, side2 and hypotenuse in which all sides are no larger than 500. Use a triple nested for loop that tries all possibilites.

0
2K
Member Avatar for VSBrown

A program that asks the user to enter two numbers, obtains the two numbers from the user and prints the sum,product,difference, and quotient of the two numbers.

0
440
Member Avatar for VSBrown
Member Avatar for Ene Uran
0
174
Member Avatar for VSBrown

Uses the string comparision functions and the techniques for sorting arrays to alphabetize a list of strings. Uses the names of 10 or 15 towns in your area as data for the program.

0
985
Member Avatar for vegaseat

The Simple DirectMedia Layer (SDL) library allows for manageable multimedia programming in console mode. Now you can mix graphics, animated or otherwise, with sound and make your game project more interesting. I am showing an example for Dev-C++ using math generated graphics, purloined from the NET, and give some instructions …

2
217
Member Avatar for eagleeye

A program that plays a MIDI file and stops it, and than starts a different MIDI file. The same concept applies to .wav files mciSendString("play the_file",NULL,0,NULL); starts playing it, and as expected mciSendString("stop the_file",NULL,0,NULL); stops playing it.

Member Avatar for tamtamtaramtam
0
845
Member Avatar for vegaseat

The WinBGI package allows you to do some of the Borland BGI graphics in a specially created window form. So don't throw out the old Borland manuals, you can still use them to do some fancy graphing! Yes, you can gotoxy() again! This code was modified for Dev-C++, a real …

1
552
Member Avatar for vegaseat

An example how to line up your decimal points in a column like output of floating point numbers. Both C and C++ versions are shown. Thanks are given to Bud Tugly, my 77 year old senior student.

Member Avatar for vegaseat
2
187
Member Avatar for eagleeye

A simple demostration of how to clear the console screen in at least Dev-C++ 4.9.8.0 (I don't know about the other since I've only tried it on this one, but may and probably works,, with few if at all minor adjustments), what more can I say, other than it's not …

Member Avatar for ankit_the_hawk
0
303
Member Avatar for Mahen

Setcolor was entirely programmed by Mahen of Mauritius. Who have never wished of changing the Font colors of the Command Prompt on the fly. Well this is where Setcolor comes in handy. The main function of this program is to change the default Font color of your Command Prompt. The …

Member Avatar for berkcan
0
312
Member Avatar for vegaseat

This code gets the local time from your computer, formats the date and the time and displays the result. Does not include the bavarian time measurement of how many steins you have finished since you got up in the morning.

2
175
Member Avatar for pcpalct

Yep. I have no life. Here's the simplest and stupidest form of C++ coding ever known to man kind...the change counter. What does it do? Count change :-)

0
246
Member Avatar for vegaseat

Nothing new, but something for the neophyte to ponder. Some of the functions (algorithms) used by STL containers can be applied to a normal array to do inane things like copying, displaying, finding max/min, reversing, replacing, searching, shuffling, sorting, summation. This can really simplify your code.

Member Avatar for vegaseat
3
342
Member Avatar for vegaseat

With the help of BCX I managed to create some C++ code that will allow you to send text to your printer and specify the font and other things. Play around with the options to suit your own needs. I have to admire the genius behind BCX, even though it …

Member Avatar for cybercode
1
319
Member Avatar for vegaseat

Short little sound files of chicken, horses, dogs, cars, trains and other annoying things is the realm of the wave file (.wav). These are easy to play and guaranteed to confuse grandpapa. Again, we are using Windows' sound workhorse winmm.lib file. Ze function this time is PlaySound(). Here is ze …

Member Avatar for danibootstrap
1
205
Member Avatar for vegaseat

Many of you know how I like to use sound to make the old computer box more interesting. The midi file packs a lot of neat instrumental music. It is very simple to play, even in a console application, using the winmm.lib file that comes with just about any Windows …

Member Avatar for evilsilver
0
217
Member Avatar for vegaseat

You can have fun and learn something too. Not too much fun though! Here we take a lighthearted look at C++ string, various ways to assign a string and substring, spell forward and reverse, find characters and substrings, append, insert, replace, remove characters, separate a sentence into words and more.

2
197
Member Avatar for 1o0oBhP

Log files are useful things. They are used in programs to display the values or variables or other useful information such as what the program is doing. This is useful is the program crashes at some point or is not behaving as it should. By writing values and events to …

Member Avatar for Rodan
0
182
Member Avatar for 1o0oBhP

An introduction to the Win32 GUI. The code creates a simple window that you can play with. Many parameters can be changed if you like! The unusual thing about windows apps is that rather than directly handling inputs (ie the position of the mouse / what control has focus ect...) …

Member Avatar for bumsfeld
0
626
Member Avatar for 1o0oBhP

A singly (sp) and a Doubly Linked list class to create linked lists. Can be used to make dynamic arrays and could also be templated to work with any data type (this is old code and i didnt know how to at the time). Has been extremely useful to me …

Member Avatar for 1o0oBhP
0
110
Member Avatar for vegaseat

The Standard Template Library (STL) vector is tempting. The burden of dimensioning an array is removed, and there are many wonderful functions to explore. The learning curve is a little steep, it will make your head swell, but in the end it's all worthwhile. Take a look at some of …

Member Avatar for vegaseat
1
175
Member Avatar for vegaseat

Let's say you worked in the White House and had to keep two lists, one for the friends and one for the enemies. The boss came to you and said: "The Almighty talked to me out of a burning bush last night, telling me that I shall make my enemies …

2
184
Member Avatar for vegaseat

Another experiment with the Standard Template Library (STL). This time we are taking a look at map. Map is a Sorted Pair Associative Container (a mouthful). The pair is -- const Key, Data --, where Key has to be unique. It is Key that is sorted. In this code sample …

1
165

The End.