Beginners - November 2018 (Page 14)

Finding the factors of a number
 
Hi, I'm trying to write a program that can find out what the factors are for a certain number. We have to use the for loop and user defined functions are also p...
[4 replies] Last: It still provides an example of recursion anyway: #include <iostream... (by lastchance)
by al3x57
If/Else with Parser/Tokens?
 
Any help to lead me in the right direction will be greatly appreciated! The error is in the 'main' section. The following are some tests... I can only get a cou...
[4 replies] Last: two things: first, it would be a lot easier if you used a map of the t... (by jonnin)
Help with Arrays and Sorting letters of alphabet in reverse, normal and sorted forms (Starting out C++ in university)
 
You are to write a C++ program which does the following: Reads in a the size of a list of characters. Reads in the list of characters. Prints t...
[3 replies] Last: Not really. It tells us what you want to do, but doesn't show us what ... (by salem c)
else and getline problem
 
Write your question here. when I use getline with else it gives error in the loop here is the code #include <iostream> #include <string> using namespace ...
[6 replies] Last: thank you all of you!!!!!!!!!!!!!! (by ahmedddddddd)
many returns, need one
 
int example (int num1) { if (num1 > 0) return num1; if (num1 < 0 ) return -1*num1; if (num1 == 0) return 0; ...
[4 replies] Last: The abs() and the ternary are better, but: int example( int num1 ) { ... (by keskiverto)
Read a single character from the beginning of a line from text file
 
Hi, I want to implement a program on finding the k most frequently occurring words from a text file. The input will be like: $facebook 5 $amazon 3 $twitter 8...
[6 replies] Last: Hey, thanks a lot for providing that! The thing is, I can't choose how... (by sugandha94)
No throw exception
 
I keep getting a no throw exception for the code I am writing for matrix multiplication. The error is happening in my display function where my cout statement i...
[4 replies] Last: void Matrix::OutMatrix() { for (int i = 0; i < ROWS; i++) { for (i... (by frocheez)
Word guessing game
 
Hello, I am taking my first semester of comp. sci and so far it's been fairly easy. Unfortunately, we reached vectors and 2-d arrays and while the concepts of t...
[2 replies] Last: Hey Andy, thank you very much for responding to my post. I did figure... (by sankarl)
by LPC123
Qt5 and Arch Linux
 
Is there a utility or plug-in for Qt5 that "converts" a C++ project to produce an ABS-type formatted tar.gz for Arch?
[no replies]
inserting comma and space
 
I'm trying to correct the output in function enterNameToGuess. it asks user "what is guess number 1?" .."number 2 " ect. in a previous code I used a while loop...
[1 reply] : string enterNameToGuess() { string name; std::co... (by closed account SECMoG1T)
by jimky
An efficient algorithm for thhis problem
 
I came across this method to find the maximum number of 1s in a given binary array. https://www.geeksforgeeks.org/length-longest-consecutive-1s-binary-represen...
[16 replies] Last: That's right, dhayden. The actual problem was never posted in this th... (by Browni3141)
helpppp
 
Write your question here. #include <iostream> #include <conio.h> #include <Windows.h> using namespace std; int main() { int s,total; ...
[4 replies] Last: alright thank you mate :) (by khairil27)
by veysel
constructive function error
 
hello friends, when i write this code,why i get this error: no matching function for call to 'sekil::sekil()' if i add sekil() { } to class sekil is working bu...
[3 replies] Last: hello tpb, sorry for how looks my code i fixed my code. hello repeate... (by veysel)
by Tduck
Stopping segfaults during -> operation
 
I've been trying to write a linked list, and I keep on getting segfault errors. What information is my program referring to which doesn't exist? And yes, th...
[2 replies] Last: If you run it under a debugger, it will tell you the exact line it cra... (by Repeater)
by owmn
Highschool C++ Homework Assignment
 
So just to start off, I really don't understand c++ much but want to learn it, and due to this I took the opportunity to be given a c++ elective course in my sc...
[4 replies] Last: Thank you very much for this detailed reply! I appreciate it, as it wa... (by owmn)
by Dum
need help in this question (1,2)
 
The last time in Byteland, Chef defeated the magician in his challenge and won a gold coin. The magician does not want to give up his coin so easily, so he g...
[30 replies] Last: All the solutions are available now on the site. I used a simple recur... (by Browni3141)
Put brackets in ArrayStack problem
 
Hello! So I'm trying to put opening brackets in 1 arrayStack and closing brackets in Second ArrayStack. I use a normal char array to put the equation for exa...
[4 replies] Last: Ahh i understand, i made it with string and the way you explained, it ... (by FreeSocks)
[Help] how to read two files from terminal
 
Hi the code below helps but I can't seem to figure out how to make my program read from to files. Example: # g++ hello.cpp -o hello # hello read.txt t...
[2 replies] Last: Thank you! it works now! (by JanetArthur32)
Help with arrays!
 
The goal of this program is to display the average of five scores without the highest and lowest. I keep encountering Complier Error C2664 on lines 20-25 and th...
[12 replies] Last: Referring to your latest code: I urge you to write comments above eac... (by dhayden)
Guessing game
 
This is my first code in c++. The problem is when the player loses the game the program write this : "Too Low!Too Low! You Lose!" or "Too High!Too High! You Los...
[9 replies] Last: Thank you tpb for pointing out the bug in my code. Ironically, I had ... (by dhayden)
November 2018 Pages: 1... 1213141516... 24
  Archived months: [oct2018] [dec2018]

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