User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 363,779 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,579 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C++ advertiser:
Contribute Code
This program generates lines of pascal's triangle, numbers after 23 generate weird output. (View Snippet)
This program takes a parameter, which is how many prime numbers you need. However if you want to make a program which checks whether a number is prime or not you can delete everything in the main function and put this line instead: cout << isPrime (argv ) ? "It's a prime." : "It's not a... (View Snippet)
Two methods for two distinct needs when splitting a string (View Snippet)
This program uses snipets from a couple of other programs that I put together in order to make a program that displays the time and date and refreshes the time and date every second. I commented practically every line to explain, as far as I know, what it does. If you know of an easier way to do... (View Snippet)
Frequently, you may need to isolate words in a phrase. In this example, we'll use substr to carry out this task. (View Snippet)
This is a neat little program to calculate the date of easter in any given year. The principle is based on the julian calendar. (View Snippet)
First off, C++ does not know anything about the I/O device you are using. It can be a keyboard and monitor, or a file, or a network connection, or anything which can do I/O. What that means is that there is no standard way to do this in C++. That said, the following should work on any Unix/Linux... (View Snippet)
This is a simple example of how to delete a line from a text file. In order to do that you have to completely rewrite the file, leaving out the line(s) you want to delete. First open the input file, then open an output file (doesn't matter what filename you give it as long as its a legal file... (View Snippet)
hello frnds this is a snippet that removes comments of c, c++ , java files (View Snippet)
This snippet will allow you to separate or "explode" strings into vectors via a character separator or the visa versa. In which case you would take a vector and "implode" it into a string separated by a character. Also keep in mind that this requires the libboost libraries. This was tested on Linux... (View Snippet)
Contribute Code
All times are GMT -4. The time now is 10:40 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC