49,761 Topics

Member Avatar for
Member Avatar for richman0829

isalpha and ispunct work punctiliously, but isspace spaces out. [CODE] cout << "Please enter an integer: "; cin >> str; int bogus = 0; for (int i = 0; i < str.length(); i++) { char temp = str.at(i); if (isalpha(temp) || isspace(temp) || ispunct(temp)) { cout << "Please try again!" …

Member Avatar for richman0829
0
295
Member Avatar for windany

This code : ...line 6... [code] #include "FileToVector.h" #include "VectorToIntArray.h" #include <string.h> #include <iostream> using namespace std; int main(int argc, char *argv[]){ char* in = argv[1]; FileToVector ftv = FileToVector(in); vector<char> v = ftv.fileToVector(); VectorToIntArray vt = VectorToIntArray(v); //int* a = vt.letterFrequencies(); cout<< v.size(); return 0; } [/code] produces this …

Member Avatar for windany
0
99
Member Avatar for dillinger88

HI, I'm relatively new to programming in C++. I'm pretty solid in C and Java though. Anyway, I'm trying to create a class, Mesh, that has a vector full of my other class, Node, however the compiler doesn't seem to like it. I've looked through the console message but I …

Member Avatar for dillinger88
0
201
Member Avatar for dmane

Hi All, I am trying to learn stl to have some knowledge of how things work. I have just covered some basics and I have come to a block. I will explain what I am trying to do. I have a class that performs some basic operations on its member. …

Member Avatar for mattjbond
0
127
Member Avatar for iamvish

Hi all I want to use GetProcessMemoryInfo to get current memory used by my process..then which PROCESS_MEMORY_COUNTERS (which it takes as argument and return information in it)member is useful.. Please help me...

Member Avatar for Narue
0
70
Member Avatar for avataralien

I have problem understanding hashing using linear probing & quadratic probing. Is there any easy to understand guides?

Member Avatar for Narue
0
69
Member Avatar for aianne

Hi! I need help for my homework in c++. My professor wants us to write a program that ask a question and there is a multiple choice and the answer. like the gameshow "Who wants to be a millionaire?" Please give me some example.. (^_^) thank you so much!

Member Avatar for Tigran
0
100
Member Avatar for empror9

hello, how can i call function from another function? i declare 3 functions which are move_mid ,move_left and move_right please see this code (it's just my idea and i know i has many syntacs erorr , but my goal is just how a function call some functions) [CODE]move_left() { cout …

Member Avatar for empror9
0
86
Member Avatar for Arkapravo

Desperately need help ! ..... I need to install Player/Stage ( [URL="http://playerstage.sourceforge.net/"]http://playerstage.sourceforge.net/[/URL] ) on Ubuntu 9.10. Found this, [URL="http://curtis-thoughts.blogspot.com/2010/01/install-playerstage-in-ubuntu-910.html"]http://curtis-thoughts.blogspot.com/2010/01/install-playerstage-in-ubuntu-910.html[/URL] ..... but could not get it to work ! Any help is greatly appreciated !

Member Avatar for Arkapravo
0
201
Member Avatar for empror9

Hello guys, i would like to ask you about c++ language. i have an assignment and i want to do a movement for the hero? i have an assignment and i want to do a movement for the hero which will be controled by the keyboard.i apologise because my english …

Member Avatar for strmstn
0
142
Member Avatar for farvahar_mr

hi my friends1 i want to compile c++'s code in fedora but when i used this code: g++ Filename.cpp -o filename.exe my code compile successfully and when is used this code: ./filename.exe my program run but when encounter by scanf an i give input in give me "segmentation fault" an …

Member Avatar for strmstn
0
123
Member Avatar for lexeroni

any one have any suggestions why my code won't work? [CODE] #include <iostream> #include <fstream> #include <cmath> using namespace std; int intro(int &num_games); int random(); int main(void) { int seed(0), num_games(0); int point, point2(1); int a(0), b(0), c(0), d(0); cout<<"Lexi Barlow and Alex Puffer craps.cpp"<<endl; intro(num_games); cout<<"\nEnter a random seed …

Member Avatar for CreativeCoding
0
122
Member Avatar for wilko1995
Member Avatar for CreativeCoding
0
107
Member Avatar for wilko1995

Hey, im making a code to ask a user to type in a username and password to continue and for the console to say "thanks" and i need help. Heres my "Unsuccessful" Code: [code]#include <iostream> using namespace std; int main(){ int a, b; a = 159876; b = 43812385; int …

Member Avatar for wilko1995
0
121
Member Avatar for nats01282

i have been told to use a do while loop instead of a goto statment, here is a code i made to try the do while loop, [CODE] int main() { int A = 0; cout << "Enter a number from 1 - 5 " ; cin >> A; do …

Member Avatar for photoyid
0
101
Member Avatar for ravenrider

Hello I was always wondering whats the difference between compiling in these different environment Linux and Windows ! and Why can’t we just run the same executable file (compiled in Linux) both on Windows 7 and Ubuntu? also I

Member Avatar for ravenrider
0
54
Member Avatar for aceofspades451

I'm trying to design an algorithm that will output data from an array in random order but not repeat until every peace of the data has been output. The size of the array is small (about 10). it picks a random prime number smaller than the size of the array(lets …

Member Avatar for aceofspades451
0
147
Member Avatar for Bart_sg

[CODE]#include <iostream> #include <iomanip> #include <string> using namespace std; int main() { double V,I,pf,Ib; unsigned short int choice; int In; cout<<"Please choose power supply type\n"; cin>>choice; switch(choice) { case 1:cout<<"You have chosen a single phase power supply\n"; break; case 2:cout<<"You have chosen a three phase power supply\n"; break; default:cout<<"Invalid Choice …

Member Avatar for WaltP
0
69
Member Avatar for harneet singh

can anybody help me how i can jump proxy server and firewalls to open an orkut in user account....

Member Avatar for VernonDozier
-5
31
Member Avatar for sikeufoo

The highlighted part below is where the function located...Is there any problem with the input? [CODE]#include <iostream> #include <iomanip> using namespace std; // function declaration for price to pay. [COLOR="Red"]float caldiscountprice(float[],int[],float[]); [/COLOR] // function declaration for discounted price. [COLOR="Red"]float calpriceafterdiscount(float[],int[],float[]); [/COLOR]//function declaration for Price after Discount int main() { int …

Member Avatar for WaltP
0
125
Member Avatar for rajeevkag

We are developing a C++ project with 10 cpp files and 3 header files.We are declared array structure of 3 integer varibles globaly in header file and using in some files and where arrays are updated ,re-adjusted in some cpp files and use in another files.Project is running fine but …

Member Avatar for rajeevkag
0
90
Member Avatar for ineedhelp:(

[code] #include <iostream> #include <cmath> using namespace std; int main() { double L, APR, Payment, N, brac1, brac2; cout << "Please enter the loan amount: "; cin >>L; cout << "Please enter the APR: "; cin >>APR; cout << "Please enter the number of payments required: "; cin>>N; brac1 = …

Member Avatar for mrnutty
0
109
Member Avatar for oxy77

I have been trying to figure this out for a little while and I really can't seem to get a good grasp on where I am messing this thing up. I keep getting errors: Error 2 error C2664: 'input_polar' : cannot convert parameter 2 from 'int' to 'double &' Error …

Member Avatar for oxy77
1
153
Member Avatar for Ca67

Language : C++ I have had a bit of confusion with overloading the script operator. Not really sure on how to incorporate the operator. I am almost finished coding a program assignment except for this problem with the srcipt operator. The script operator info taken directly from assignment instructions is …

Member Avatar for Dave Sinkula
0
118
Member Avatar for squarey

Hi Guys I am writing a function using boost.regex. It should return false if no brackets are found, true if there is a complete match and an exception is thrown if an odd amount of brackets are found (i.e. only opening bracket but not closing bracket). The problem is it …

0
48
Member Avatar for ttunstall07

i am trying to work on an assignment that asks me to prompt the user for a name of one of three employees, then prompt for the work hours of 6 days. each of these will be stored in a separate array. then i am to implement the following rules …

Member Avatar for jonsca
0
75
Member Avatar for mebob

Hi, i am doing my mom's c++ for engineering class, and doing a project for her, i noticed something in the extra credit section of her project directions. it says to add graphics to represent what variables the users are entering. in this one, it is about beam deflection, and …

Member Avatar for mebob
0
118
Member Avatar for Bigojac2000

Each of the two food stores, A and B, of the same company has a list of products that are available in its stock. We assume that the standard input contains NA records for food store A and NB records for food store B. Each record describes the code of …

Member Avatar for NathanOliver
0
187
Member Avatar for silvert122

i am trying to write this program and i have no clue how to do it. Could someone help me please. thank you! a) The program implements insertion sort, merge sort, quick sort, and counting sort as subprograms or classes; b) The program reads input from a data file specified …

Member Avatar for Nick Evan
0
101
Member Avatar for steven1285

i need to write a C++ program that reads a sequence of integers and saves it into an array. Your program has to check whether each integer n in the sequence is perfect using a brute force approach. That is, your program should use all possible divisors of n from …

Member Avatar for Fbody
0
82

The End.