Beginners - December 2018 (Page 10)

Why is this rhombus so slow?
 
slow app!! #include <iostream> using std::cout; using std::cin; using std::endl; int main(int argc, char** argv) { int tamanio; //vari...
[4 replies] Last: In addition to what jonnin said, note that the use of std::endl will... (by Ganado)
by Bopaki
The program does not print the data on the screen
 
Here is what I get when I run the program --------------------Election Results-------------------- Votes ...
[2 replies] Last: you have printHeading(); printResults(candidateList); the heading s... (by ne555)
semantic error:variable_sized object may not be initialized.
 
why?? I already set "n" as a const number //copy int vector to int array #include <iostream> #include <vector> #include <cstddef> using namespace std;...
[2 replies] Last: Got it! Thanks.. (by Iron123)
Unknown statement small error before compiling
 
There is just one line that prevents me from compiling.I am not familiar with the term of the statement between my WebApps.H function and my survey.cpp program ...
[1 reply] : > http://www.cplusplus.com/forum/beginner/247570/ You only fixed it in... (by salem c)
Cs small issue wont compile
 
Error on my code wont compile,survey.cpp-- no matching function to call WebApps::param; in webApps.H error candidates are std::string WebAbbs::param I have no ...
[2 replies] Last: In the line string vote = wo.param("vote", name_value_pairs, f_cnt); o... (by KilLoganPaul)
Pulling a CSV file in xCode
 
Hello All, I am having a hard time pulling information from a file in xcode, I have tried dragging and dropping it into the program. I am not sure what to d...
[1 reply] : > const int size = 6053; Is your input file always exactly this number... (by salem c)
variable is not permanently added
 
Hello. I am trying to create a piece of code that takes an input from the user, and sends it similar to a pyramid. For example, Input: Bear B Be Bea Bear...
[1 reply] : #include <iostream> #include <string> #include <cctype> int main() {... (by mbozzi)
Error correcting user input in a 4 function calculator
 
I am trying to build a 4 function calculator that acknowledges and corrects input errors. If a user puts in words instead of numbers I want the program to recog...
[7 replies] Last: Ahh fixed that, why isn't a recursive function appropriate here? Re... (by TheIdeasMan)
Use of virtual functions
 
Hi all.This is my assingment(i am translating from Serbian):I have one class Workflow which has array of pointers type Step and length of array as private membe...
[7 replies] Last: 1. You can't compare C-strings like that. C library has a function for... (by keskiverto)
Tic Tac Toe game - Functions
 
hi huys, so i'm working on this project - tic tac toe game for couple of days, and i have two problems: first thing first, and most importantly, i cant figure...
[8 replies] Last: thx guys this is good brain food :D (by smurf123444)
Problem with my code
 
I have a problem with my code, the file won't open. #include <iostream> #include <fstream> #include <string> #include <map> #include <iterator> usi...
[3 replies] Last: Hello Volzvolz, As I suspected the , ios::in | ios::app was the pro... (by Handy Andy)
by veysel
constructor
 
hello, my question is what is the big difference between member function and constructor since i can assign data to variable with member function without constr...
[2 replies] Last: firstly thank you, the reason for i ask this question is why we dont u... (by veysel)
Finding the Average from a Data File
 
Assignment Question: Read and parse each line in the data file credit.txt and store the data in appropriate variables. This is what I have, and it isn't even co...
[7 replies] Last: So I get an answer that is a lot closer to the one I was supposed to g... (by nitoooe1)
Changing information in a specific spot in a file
 
I have a text file, let's call it "words.txt" words.txt reads exactly as follows: line1 word1 word2 word3 line2 word1 word2 word3 line3 word1 word2 word3 I ...
[2 replies] Last: #include <iostream> #include <fstream> #include <sstream> #include <v... (by lastchance)
If in DOWHILE loop?
 
I want the loop to stop when totalGuesses turn into 0. How do I do that? In the bottom code I added a break for this condition but the first time I run it. it b...
[4 replies] Last: Are these different? // A if ( guess != number ) do { // code ... (by keskiverto)
by nlizzy
Random Word Generator from Multiple Lists
 
Hi. I am VERY new at programming and I want to make a "Guess Who" game. I want to be able to randomly select a characteristic from each list. I'm pretty sure my...
[3 replies] Last: #include <iostream> #include <string> #include <cstdlib> #include <ct... (by JLBorges)
Structs
 
This code intends to output a selection of the snack a user chooses along with the price and change owed by a vending machine. I need it to subtract one from th...
[2 replies] Last: I think I see your problem, the problem is you are not breaking out o... (by adam2016)
Reference passed process vs value passed process
 
Can someone kindly explain each object's life cycle in each scenario I created in my code? I cannot understand the output fully especially for scenario 4. ...
[1 reply] : // Scenario 1: A&nothing(A a) Constructor Called! // aa is created Co... (by Peter87)
Assignment
 
I'm currently working on another program which requires me to input a bunch of arrays atm. I need an immediate answer to this. Write the code to display the sm...
[2 replies] Last: @zephile , post it in the jobs section and someone may immediately do ... (by chicofeo)
How to compare vector digits
 
Hello. I am creating a bool function that returns whether an integer in a vector is greater than the second integer, but I don't know how to compare them. #...
[1 reply] : Hello TheDomesticUser2, You have included the "string" header file, b... (by Handy Andy)
December 2018 Pages: 1... 89101112... 22
  Archived months: [nov2018] [jan2019]

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