General C++ Programming - April 2014 (Page 9)

by pesty
Help with words,lines and vowels
 
So I need to make a program that counts the number of words, lines, and vowels in a program. Punctuation and white spaces are not counted in any of the counts. ...
[1 reply] : Here's an example of the exact program. #include<iostream> using nam... (by KyiannaJones)
question about && in declaration
 
I sometimes found the declaration like 'int &&a', 'T &&v' in the function argument list. What's that meaning?
[3 replies] Last: Here's an example of a Double Address Operator: vector& operator=(vec... (by KyiannaJones)
Input to Array!
 
I'm having some problems with Input to an array from a file. I think that i need to make a new array for every instance of the loop but i can't figure out how. ...
[1 reply] : Overloading Operator Example: X& X::operator=(X rhs) { swap(rhs); ... (by KyiannaJones)
Compiling Error: LNK 2019
 
/ // curl_util.h // quote #ifndef curl_util_h #define curl_util_h #include <memory> #include <stdexcept> #include <string> #include <curl.h> n...
[1 reply] : setOpt() is a template function, so it has to be declared and defined ... (by helios)
for-loop question
 
Here is a for-loop for(unsigned long long j = 0; j <= 1000000; j++) { timeStep = j*timeDelta / 1000000; x = forceX*timeStep*timeStep / 2.0L + dire...
[3 replies] Last: break takes you out of all of the loops (by lolnyancats)
Need some help with my operator overloading
 
Hello everyone, I have a hw assignment where I have to take a program I've already done, and overload the increment decrement operators. Now My teacher ga...
[2 replies] Last: operator name needs to be declared as a function and this needs to be... (by mattig89ch)
help
 
This code just terminated after this part can some please tell me why? void indhenta(double a ,int m){ int i; for(i=m;i>=0;i--){ cout<<endl<<"indtas...
[4 replies] Last: If you don't want to help, then why waste time replying? (by wildblue)
I'm having trouble moving a vector after I iterate through it
 
I have a project where I have a bunch of molecules moving around a box, I need the molecules to form a polymer if they come close to each other, if the polymer ...
[2 replies] Last: thanks, sorry am new didn't have time to read the rules ... p.s. I add... (by msmit247)
Subtraction of two integers
 
Hey guys. I am working on an assignment where I have to subtract two very large integers. How can I write it's code provided that I have both numbers in a cha...
[4 replies] Last: You should make a variable that holds your remainder. I remember doing... (by KyiannaJones)
Reaching End of File too early
 
I'm reading input from a file using an ifstream. The program doesn't seem to read any characters but continually returns eof no matter what file I use. Even whe...
[1 reply] : You must first open the ifstream object before trying to use eof();... (by Aceix)
Need serious help with classes!
 
I NEED TO KNOW HOW TO ACCESS EACH INDIVIDUAL SQUIRRELS ATTRIBUTES SUCH AS SKIP FACTOR AND LOCATION ON EACH ROUND! Ok I think the header files and cpp files a...
[8 replies] Last: yeah i already saw and fixed it. I also repaired the .set_skip_factor ... (by treyrox)
Whenever i boot the program 'test.exe' it stops working
 
Does anyone have any suggestions? I have tried rebuilding then compiling and then running it again but it always doesn't respond. This is the only project I hav...
[1 reply] : More info... Aceix. (by Aceix)
Segmentation fault
 
After running this piece of code I get a message from gdb saying that curr = curr -> next; causes a seg fault. I don't know why. Any help that could be given ...
[4 replies] Last: Basically, this is the error thrown by ::operator new or ::operator... (by TwilightSpectre)
by Chubby
Merge array.
 
i am stuck at int main . I dont how to create an array that will store in Queue and merge them. But I got the function and head files fine but thta int main (o...
[2 replies] Last: Here is a link that should be helpful. This is an example of how to m... (by KyiannaJones)
junk return on passing an array
 
i passed an array from a function from a class and i am using the object of that class in other file but when i pass it the values of that array are coming ssom...
[12 replies] Last: Codewalker's solution is good, if a little vague. Since you cannot ha... (by Disch)
2D array in Boolean function
 
i have a Boolean function containing 2D dynamic array, it'll retain either 0 or 1, how can i delete the dynamic array? bool something (int** a,int b, int c) { ...
[3 replies] Last: giblit, good catch :) I was just demonstrating how to delete all... (by Codermik)
private data member is accessed and no error
 
Here in below code, the private data member is accessed directly using dot operator IN COPY CONSTRUCTOR and the program runs without error. Please explain.... ...
[1 reply] : The copy constructor is a member of the class. Therefore, it has acces... (by booradley60)
by smk385
String function help
 
I am writing a code that prompts the user to enter a part # that is 4 or 5 characters long. The 2nd and 3rd characters must contain either of: MS, MP, FS, FO o...
[5 replies] Last: Great! Thank you Peter, That was it! (by smk385)
Program on Classes
 
Please help me with this program!!!! I have been getting A's on all my other programs and I don't understand this one at all. HOW DO I DO THIS PLEASE Overv...
[2 replies] Last: This task is pretty simple it just asking you to put data about a pers... (by Mizfizz)
Activity diagrams (for recursive function)
 
Hey! I really need help, i have alot in school right now. Becuase i'm about to get a summerbreak. Question: How can i make a Activity diagram for a recursive ...
[no replies]
April 2014 Pages: 1... 7891011... 41
  Archived months: [mar2014] [may2014]

This is an archived page. To post a new message, go to the current page.