Beginners - March 2017 (Page 10)

Count sentence.
 
Write your question here. Hello all, I have a homework which is counting sentence based on the dots you plugged in but my program only count the sequence of t...
[2 replies] Last: use std::count() http://en.cppreference.com/w/cpp/algorithm/count (by gunnerfunner)
Process a data set of random numeric information
 
It should start by creating an array that can hold a maximum of 100 double or float elements. There should also be at least one integer that will hold the numbe...
[1 reply] : so the steps in your program would be: 1. declare double myArray whic... (by gunnerfunner)
What does cout<<" "; mean?
 
Truly a beginner's question.So,if i dont use cout<<" "; the program would be wrong,why is that,why do i need to use cout<<" ";? #include <iostream> us...
[1 reply] : It just outputs a space. (by helios)
Parallelogram using For Loops
 
I'm trying to write a program to output a parallelogram. It's suppose to be of a size the user choses and with a symbol chosen by the user as well. I am able to...
[4 replies] Last: Here's a couple of other obscure variants. I'm still working on a recu... (by lastchance)
by Arcy
Loop/array question
 
Hi everybody! A coding noob trudging through his first attempt at programming with the help of Stephen Prata's "C++ Primer Plus" here. While working on an...
[6 replies] Last: Thank you for your help, AbstractionAnon. I think I understand what mi... (by Arcy)
Assign all values ​​in a dynamically allocated 2d array at one time
 
So, I have a dynamically allocated matrix. How do I avoid having to assign the values ​​one by one? Is there a way to assign all values ​​at once? ...
[6 replies] Last: #include <iostream> int main (int argc, char * argv ) { int row_... (by closed account 48T7M4Gy)
Program that determines if number is prime. How do I make it work for multiple numbers?
 
I have a homework assignment to see if number is prime and it needs to be able to analyze one or more numbers. It also has to display divisors of numbers that a...
[2 replies] Last: bool is_prime(int num){ //lines 19--24 return count==2; } int ... (by ne555)
How to Read a sentence in a .txt file HELP!
 
** How do i Read a sentence in a .txt file??? My output is just "INeed" now im pretty sure its a getline issue but I cannot figure out how to use it. Anyone th...
[1 reply] : inputFile.open("File.txt"); inputFile >> one; inputFile >> two; You... (by mbozzi)
For loop output?
 
After for loop is run, what will be the values in the array? int number = {1}; for(int i = 0; i < 5; i++) if(i % 2 == 0) number = 2 * i; ...
[1 reply] : Try it. 0 0 4 0 8 (by joe864864)
by ISO101
Triplet Template Class
 
My question: Define a template class for a generic triplet. The private data member for the triplet is a generic array with three elements. The triplet ADT ha...
[5 replies] Last: thanks cire, one of these days I'll learn to count! (by gunnerfunner)
Error in my program
 
I'm trying to fix an error in my program. The error is Error C2059 syntax error: '}' Line 69 This is my code. Thanks in advance. #include <iostre...
[2 replies] Last: break; under default. Can add error message too. (if it applies)... (by kingkush)
All help is appreciated.
 
OK. I am supposed to write a program for averaging quiz grades. The problem I am having is the last nested loop. It is supposed to output averages for three stu...
[11 replies] Last: I have stopped working on it for now so its the same as above. Spent t... (by karmakrazy937)
How to overload > operator?
 
How do I go about doing this? I've gotten some answers here on the forum but I'm having difficulty understanding it. I've even look at overloading different ope...
[10 replies] Last: bool operator < (const CardTemplate& lhs, const CardTemplate& rhs) { ... (by kingkush)
setw Problems?
 
I have a problem with setw inside my while loop. When I run it, the first 30 loops are fine. On the 31st loop, there is an extra space for no reason. Anyone kno...
[4 replies] Last: Hello XRayKiller, I do not know if this will work with real numbers, ... (by Handy Andy)
i need help with array
 
for some reason the code keeps saying that there is no operator found that takes a right hand operand of type 'star_system', this is only up to the part where i...
[2 replies] Last: You can display individual member variables without overloading but if... (by kingkush)
SDL.h No such file or directory
 
I get this error: http://imgur.com/a/ltM93 Everything works ok with SDL until i try to use the image or mixer libs,everything is set up correctly i think :...
[1 reply] : Instead of -lSDL2 I think you should use `sdl2-config --libs` . And... (by Peter87)
by Dagr
Help!
 
Hi guyz i need to count Surface Area and volume of toroid i need formulas....
[2 replies] Last: thanks (by Dagr)
summation symbol in C++
 
Write your question here. any one here can help me please....? my question is that "how we can write summation symbol in C++......"
[7 replies] Last: > std::cout.imbue Not actually needed on Unix/Linux since you're usin... (by Cubbi)
by Kmpck
Convert CString to DIR variable
 
Hi guys. I have been doing well lately but have ran into a snag. I am trying to figure out how to convert a CString to a Directory (DIR) variable. I can ...
[6 replies] Last: Hello Kmpck, A few months ago when I went looking for "dirent.h" I fo... (by Handy Andy)
what is this argument?
 
I was reading a source code of a software and came across this line of code. static void clear_state_f_static(PluginDef*) what kind of argument doe...
[2 replies] Last: you can leave the name off args in function defs. for example void... (by jonnin)
March 2017 Pages: 1... 89101112... 36
  Archived months: [feb2017] [apr2017]

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