Beginners - September 2017 (Page 5)

getch....help
 
i can not print my "pass" eventhough i input a tons of thing #include<iostream> #include<cstring> #include<conio.h> using namespace std; int main(){ ...
[6 replies] Last: "Andy" makes any thing become crystal clear....really really apreciate... (by phongvants123)
by xost0x
small key pressing issue
 
Hey guys, newbie here. I had a problem with some really small code I was trying to test. My aim here is that in the console, 4 variables are being displayed a...
[2 replies] Last: Got it, thanks. (by xost0x)
Reading a string and store it in multiple arrays in C
 
Hello I'm new to C and I'm trying to take a string input that takes up to 3 words, and store it in one array, and then store every word from that input in anoth...
[4 replies] Last: > \n isn't always 1 char; it is 2 on windows... In every C and C++ im... (by JLBorges)
Storing string input into different arrays in C
 
Hello this brand new noob on C is trying to take a string input of 3 words and store it on 3 different arrays, not 2D nor 3D arrays. For this problem I'm not al...
[2 replies] Last: which is (n++) if you prefer array notation. I stopped using * notat... (by jonnin)
Why is the execution time 0ms? (1,2,3)
 
My program calculates the factorial of 100: #include <iostream> using namespace std; int main() { double fac, tmp1; double duration; fac=100...
[46 replies] Last: An example where recursion is significantly slower than iteration: #... (by JLBorges)
need way to switch between players' turns in pick up sticks
 
#include<iostream> using namespace std; int main(){ cout<<"*** Welcome to Pickup Sticks ***"<<endl; string name1, name2, playerTurn; ...
[1 reply] : #include <iostream> #include <string> #include <algorithm> int main(... (by JLBorges)
Need Help implementing this algorithm
 
How do you read variables into the command lines? Prompt: Make a program that implements this algorithm in a function. The main program should accept the val...
[9 replies] Last: #include <iostream> #include <string> void alg( unsigned int n ) { ... (by JLBorges)
about const iterators 2
 
i have seen a const iterator defined as this: const_iterator cend() const noexcept { return const_iterator(end_); } why are there 2 const expressions ? ...
[1 reply] : The keyword const only appears once in that line, immediately before... (by mbozzi)
need help with decimal places
 
I need to average 5 test scores (0, 92.8, 100, 100, 100) and i have to get an average of 78.6 but i keep getting 78.56. I also need the average of 100, 100, 100...
[3 replies] Last: I've seen std::fixed << std::showpoint << std::setprecision(1) also... (by rjphares)
STRUCT not taking values
 
I am having a problem assigning a value to a variable in a struct. I'm placing my whole code to see if anyone can spot a problem, but the area I am having troub...
[8 replies] Last: Hello DaRealFonz, Before I get side tracked again I want to mention t... (by Handy Andy)
Implementing a loop
 
I have the conversion rates. I'm just having trouble implementing a loop with decision statements. Any help or advice would be greatly appreciated. /* All...
[12 replies] Last: If you actually did the first part of the assignment, then I would exp... (by Nico)
Trying to keep track of keys pressed
 
For some reason, it doesn't print anything correctly. EnterPressed is "essed", and characters on the keyboard come out as "@" or nothing. I'm a bit of an amat...
[3 replies] Last: The general form for using getch() is: int ch; switch (ch = get... (by Duthomhas)
returning junk values in pop function of a stack
 
Write#include<iostream> #include<cstring> #include<fstream> using namespace std; class integers { public: int row; int col; }; class isFull { c...
[1 reply] : delete arr; looks wrong in pop. arr appears to be the stack's contain... (by jonnin)
Need Help finding different values in 2 arrays
 
I need to find the difference between 2 arrays and store them in a 3rd array. I am having trouble account for repeat values in each of the first 2 arrays: i.e....
[3 replies] Last: Indeed. Well, you are using them on line 126 of your program. Anyway,... (by lastchance)
Text file read and write
 
How do i make my program more efficient and eliminate the need of 'end of file'?(line 34) #include<iostream> #include<fstream> using namespace std; struct ...
[3 replies] Last: i use dot to end input to remove any sort of error as i like to mix c... (by Chervil)
Make it faster
 
Write your question here. So my program is ready and it works just fine but im sending it to our site of the university and it doesn't accept my solution beca...
[10 replies] Last: Since in both vectors, "The numbers go in non-increasing order", they ... (by JLBorges)
Pthread Multithreading
 
I'm still very new with multithreading(pthread) and I'm still trying to familiarize with this. Right now, I have the following code that calculate the sum. ...
[no replies]
Write a C++ program for two students comparing their grades
 
I need help writing a C++ program to compare between two students grades. Two students A,B in CSc 102 compared their grades (0 <= <=5) in the first 3 laboratory...
[4 replies] Last: Hello basel07, //#define RELEASE // <--- Uncomment when compiled f... (by Handy Andy)
Multiple Definition Error with Operator[] ??
 
So i'm messing around with the operator since prof wasn't very clear on it but I get a build error for multiple definitions. I code mainly on cLion, I tested i...
[2 replies] Last: If you define myClass::operator outside the class body in a header fi... (by andywestken)
by SasuKe
Run time error
 
file:
[4 replies] Last: could he have said that because there's more linked lists? I have no... (by Thomas1965)
September 2017 Pages: 1... 34567... 21
  Archived months: [aug2017] [oct2017]

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