Posts
 
Reputation
Joined
Last Seen
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
41% Quality Score
Upvotes Received
2
Posts with Upvotes
2
Upvoting Members
1
Downvotes Received
3
Posts with Downvotes
2
Downvoting Members
2
2 Commented Posts
0 Endorsements
Ranked #11.7K
Ranked #2K
~4K People Reached
Favorite Forums

15 Posted Topics

Member Avatar for silverpanda

Here you go. Let me know if you find any problems - I wrote this while half asleep. [CODE] #include <iostream> #include <vector> using namespace std; bool isDelim(const char& query, const string& delimList){ for(int i = 0; i < delimList.length(); i++) if(query == delimList[i]) return true; return false; } vector<string> …

Member Avatar for jonsca
0
392
Member Avatar for determine

Or in a more compact way: [CODE] const string PLANETS[10] = {"mercury", "venus", "earth", "moon", "mars", "jupiter", "saturn", "uranus", "neptune", "pluto"}; const double GRAVITY[10] = {0.4155, 0.8975, 1.0, 0.166, 0.3507, 2.5374, 1.0677, 0.8947, 1.1794, 0.0899}; string strLower(string s) { for(int i = 0; i < s.length(); i++) s[i] = tolower(s[i]); …

Member Avatar for user422
0
154
Member Avatar for Frederick2

This little program will launch your g++ compiler and time how long it took to compile the source. Update the compiler_path variable to reflect your system's configuration. [CODE]#include <iostream> #include <ctime> #include <string> using namespace std; int main(){ string compiler_path = "c:\\mingw\\bin\\g++.exe"; cout << "Enter the file to compile: "; …

Member Avatar for Frederick2
0
365
Member Avatar for van21

Post what you have done so far to show you've made some effort. Nobody is going to do your assignments for you.

Member Avatar for van21
0
96
Member Avatar for daniel1977

In the headers folder, right-click and create a new .h file. This is where your class declarations go. In the sources folder, create a new .cpp file to add your implementation of the class. Here's an example: [URL="http://www.learncpp.com/cpp-tutorial/89-class-code-and-header-files/"]http://www.learncpp.com/cpp-tutorial/89-class-code-and-header-files/[/URL]

Member Avatar for user422
0
171
Member Avatar for dennis.d.elston

[CODE] No need to create extra pointers - just dereference and increment. double average (double* a, int a_size){ double total = 0.0; for (int i = 0; i < a_size; i++) total += *a++; return total / a_size; } [/CODE]

Member Avatar for dennis.d.elston
0
193
Member Avatar for lewashby

Don't get discouraged, most people feel the same way when encountering subnetting for the first time - it is probably the most difficult networking subject. Have a look at these: [URL="http://learn-networking.com/network-design/how-to-subnet-a-network"]learn-networking.com - how to subnet a network[/URL] [URL="http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a00800a67f5.shtml"]cisco.com - IP Addressing and Subnetting for New Users[/URL] [URL="http://www.subnetmask.info/"]subnetmask.info - Networking Calcuclators[/URL] …

Member Avatar for lewashby
0
410
Member Avatar for pkfx

Here's an example based on your request: [CODE]#include <iostream> int main(){ double numInput; while(true){ std::cout << "Enter a Number (Max 10 digits)(99 to Exit): "; std::cin >> numInput; if( numInput - static_cast<int>(numInput) != 0.0 ) std::cout << "Invalid Try Again" << std::endl; else break; } if( numInput == 99.0 ) …

Member Avatar for Narue
0
120
Member Avatar for bensewards

[CODE]#include <iostream> #include <fstream> #include <vector> #include <string> using namespace std; template <class T> void swap(T* a, T* b){ T temp = a; a = b; b = temp; } int main() { ifstream infile; vector<double> vecGPA; vector<string> vecNames; double gpa; string name; // load data from file infile.open("gpa.txt"); while(infile …

Member Avatar for user422
0
203
Member Avatar for gamaliel

I've made a list for some of the more common torrent sites which you can append to your hosts file to "re-route" those connections. Open the hosts file (c:\windows\system32\drivers\etc\hosts) with a text editor and append the following list: [CODE] # torrent block list 127.0.0.1 www.isohunt.com 127.0.0.1 isohunt.com 127.0.0.1 www.thepiratebay.com 127.0.0.1 …

Member Avatar for user422
0
145
Member Avatar for txwooley

Have a look at these: [URL="http://en.wikipedia.org/wiki/C%2B%2B_Standard_Library"]http://en.wikipedia.org/wiki/C%2B%2B_Standard_Library[/URL] [URL="http://www.cplusplus.com/reference/"]http://www.cplusplus.com/reference/[/URL] If you're going to be a good programmer, start reading...a lot!

Member Avatar for mike_2000_17
0
129
Member Avatar for israruval

Stacks are available in the STL as container adapters. You can use a vector-based stack with the STL such as: [CODE]#include <stack>[/CODE] [CODE]stack<int, vector<int>> myStack;[/CODE] More details and a list of member functions can be found here: [URL="http://www.cplusplus.com/reference/stl/stack/"]http://www.cplusplus.com/reference/stl/stack/[/URL]

Member Avatar for israruval
0
1K
Member Avatar for Derek Elensar

You could also add a registry key to allow compiling by simply right-clicking on a .cpp file and selecting 'Compile This' (or whatever you want to call it). To do this, open your registry editor Start > Run > type [I]regedit [/I](enter). Expand the folders HKEY_CLASSES_ROOT > * > shell. …

Member Avatar for user422
0
378
Member Avatar for fsefsef23
Member Avatar for Gregor97

I have [I]C++ Primer Plus[/I] by Prata (5th ed) and it is an excellent book as it assumes no prior programming experience and will serve as a good reference later on. It's size may be intimidating but if you really want to be a good programmer with C++, it is …

Member Avatar for alex55
0
141

The End.