Beginners (Page 3)

visual studio error contsant
 
How to solve this error # include <iostream> using namespace std; int main() { int n=2...
[2 replies] Last: Hello zain ahmad. As TheIdeasMan said a vector would be a better choi... (by Handy Andy)
Using if statement to check whether string has value or not (homework)
 
Here is the actual question, "Write a program for a bottle vending machine in which you have to ins...
[4 replies] Last: Hello Hassan Ashas, After working with the program I came up with thi... (by Handy Andy)
Program not giving proper mathematical answer.
 
Here is the actual Question https://imgur.com/a/G6MrskV This is what I did. #include <io...
[7 replies] Last: what he said and what you're saying is literally the same thing but i... (by jlb)
comparing boolean in if statement
 
why wont this work? #include <iostream> using namespace std; int main(){ bool poo...
[5 replies] Last: Consider : if (!poop) {} is the same as if (poop == false) {} ... (by TheIdeasMan)
Need help with Arrays and Highest Element of Array.
 
Suppose you have a text file that looks like this, Alan Blandon 1, 2, 3, 4, 5 Marvin Alvarez 2, 3,...
[3 replies] Last: The row with the highest score is the index of the names. For example:... (by Thomas1965)
by Blake7
My objects are sharing a variable?
 
I'm creating a little game where I have a player and the computer fighting each other. Although, for...
[3 replies] Last: Well, think about it. Once you made my suggested change you started se... (by helios)
Borrow in C++
 
I am subtracting first number form second by using borrow it is giving right answer from 20th to 15t...
[1 reply] : #include <iostream> #include <string> #include <cctype> // true if e... (by JLBorges)
Keeping each input in a while loop instead of just the last one
 
The code you'll see is a palindrome checker. Every function works, and it will successfully compare ...
[3 replies] Last: @Andy he said "Every function works perfectly". So maybe the headerfil... (by Nwb)
Logic of this question (Homework)
 
Can someone tell me the basic logic of this program? I don't want the code, just this that what exac...
[7 replies] Last: Long double only starts to lose precision after 18 digits and that's a... (by Nwb)
Need help with 2D Arrays!
 
Suppose you have a 2D Array that looks something like this, 1 2 3 4 5 2 3 4 5 6 3 4 5 6 7 How wo...
[3 replies] Last: An alternative without the need for a 1D array: #include <iostream> ... (by FurryGuy)
by Nwb
Review my permutations and combinations program
 
Hey guys do you see any possible improvements in this code? Any other suggestions are welcomed as we...
[13 replies] Last: Thanks a lot @TheIdeasMan that was helpful ;) Oh and thank you too @... (by Nwb)
PLEASE HELP ME IN PERIODIC
 
Let's define a periodic infinite sequence S (0-indexed) with period K using the formula Si=(i%K)+1. ...
[2 replies] Last: This guy's account needs to be deleted. (by tpb)
simple stupid quick question
 
How do i push an empty data structure inside a data structure? std::stack<std::set<std::stri...
[2 replies] Last: thanks! (by barnack)
I have a QT question
 
Hey guys, yes pun intended, as you can see a QT c++ class will have a signals: and slots: acce...
[1 reply] : http://doc.qt.io/qt-5/moc.html (by Peter87)
by cc046
remove duplicate string in a string array
 
can anyone tell me or give me a code? How to remove duplicate strings in a given string array with...
[5 replies] Last: Nobody is asking you to delete anything. Insert your strings into a se... (by lastchance)
C++ How do i find most repeated elements in a vector
 
I am trying to find most repeated elements in a vector. Lets say this is the vector: [2,3,4,6,3,...
[1 reply] : std::map<int,int> (by lastchance)
Sentinel Loop
 
I want my loop program to quit after END is entered. However, my program ignores my condition and ke...
[7 replies] Last: You could try something like: while (getline(cin, x) && x != "END... (by jlb)
NEED HELP IN ARRGRAPH
 
You are given a sequence of integers A1,A2,…,AN. You may change any number of its elements (possib...
[6 replies] Last: anyone can give some hint or logic to solve PERIODIC question (by cool123dude)
Strings not functioning properly
 
Hello. Whenever I input a string containing spaces, it stores each word in each string variable. ...
[2 replies] Last: The unexpected behavior is because cin stops reading when it hits a wh... (by Nwb)
I need help passing a 2D array
 
I have this 2D array but how do I pass it into a function, I know I can use pointers but I don't kno...
[1 reply] : #include <iostream> #include <algorithm> #include <cstdlib> #include... (by tpb)
Pages: 12345... 41
  Archived months: [aug2018]

Cannot post in this page. To post a new message, go to the first page.