Beginners - November 2017 (Page 8)

Searching an array of structs for a string, then output struct data
 
Hope everyone had a great Thanksgiving! I was hoping you guys could help, during my program, at the if (userChoice == 'C') part, I need to search to see if the ...
[4 replies] Last: == compares anything there is a suitable overload for. my mistake was... (by Jaybob66)
Airline ticket system
 
Hi guys I am making an airline ticket system and have run into a snag I have been been looking at this code for an hour now and I can't see anything wrong with ...
[5 replies] Last: wow thanks guys =) (by adam2016)
by shgeto
Siplifying code
 
Hello I have part in my code which is repeating and I would like to change it to function. Can you help me please? typedef struct { int citatel; int ...
[2 replies] Last: Adding a function like bool noZeroDivision(zlomek p1, zlomek p2) { r... (by Enoizat)
calculator from Bjarnes book
 
Hi guys so I've come across a snag when trying to get my code working for a calculator using tokens anyway in the book Bjarne helps you and gives you the code f...
[6 replies] Last: I'm not quite sure what the problem is that you've found. (by kbw)
Fibonacci Array
 
So far, Arrays seem to be the most complex structure that I've ran to as a beginner to C++. The current task I'm stuck at at the moment is to produce the Fibon...
[2 replies] Last: #include <iostream> int main() { const int SIZE{20}; int f = {... (by lastchance)
by urko18
How reduce code in arduino
 
Hi everyone! I am programing in arduino a control of a robotic arm with 4 motors, and I have the same code of movements for each motor, each one with his num...
[4 replies] Last: Thank you for answering jonnin! I´m trying to do what yo say: vo... (by urko18)
Help with a for() loop in a structure
 
I have an assignment to create a CandyBar structure with the members: Name, Weight and Calories. The problem I am having is we are to use a dynamic array and pr...
[1 reply] : So I just realized I totally goofed and in my loop candy should have ... (by jerrinst)
by eci0x
sorting dynamic 2D array
 
I want to sort a 2D DYNAMIC array horizontaly & verticaly. I want to do it 1 row at a time, such as 123 312 231 horizontally to: 123 123 123 and the sam...
[4 replies] Last: std::sort will do a full row at a time. so you need a loop over all t... (by jonnin)
Making an array with a user specified amount
 
Is there a way of making an array with an amount depending on how many "words" in a string that a user types? Say I put 1+2+3+4 it would make an array with 7 ...
[4 replies] Last: Wow, thank you! I'll just rip off your code then change it a bit and m... (by Ostrich)
Translating pseudocode
 
I need help in translating a pseudocode. It is very simple but can't seem to wrap my mind into it. pseudocode for string1 in stringVector1 for string2...
[1 reply] : http://en.cppreference.com/w/cpp/language/range-for (by keskiverto)
YES/NO COUNTER
 
Does anyone know how to code Yes/No Counters? I'm working on a project and it's for an if-else statement. Below is a sample. cout << "Did you spend a lot in ...
[1 reply] : cin << ans_1; When reading into the variable, the arrows go the othe... (by Repeater)
by huhuh
Different result evey this code is executed
 
I'm trying to find the biggest palindrome when two 3 digit numbers are multiplied. Why is it that my code never display all the palindromes? Every times it run...
[4 replies] Last: Thanks! I did search before posting but didnt stumble on that link. (by huhuh)
INFIX TO POSTFIX
 
I am working on a program which convert infix expression to postfix expression. But program is not working as expected. I need your help me to figure out the...
[1 reply] : Hey i got the answer. Now no need to reply. You can use the code to de... (by HACKER522)
employee system
 
hi
[5 replies] Last: g (by ghost00989)
metrix
 
hello , i need some help with this code . im trying to program a metrix of 5x5, that get from the user a letter, than the program export the column index whi...
[4 replies] Last: #include <iostream> using namespace std; const int ROWS = 5; const i... (by shirshir950)
getline isn't allowing input
 
Hello! In my statement, if (userChoice == 'S'), the getline statement should be prompting the user for input asking for the students name, however it seems to a...
[1 reply] : I fixed your problem with the input,now the input should work the pro... (by adam2016)
comparing string letter by letter
 
I want to get a string from user and stop when they enter "*". I think it can be done with do-while (right?) the problem is then I want to check the string char...
[4 replies] Last: New line where? In stored string or in output? std::string input; st... (by keskiverto)
ofstream not written to file
 
hi guys I have a problem which is confusing me so I seen someones challenge on the forum and decided to see if I could help and try it myself anyway I have come...
[9 replies] Last: thanks Chevril =) I fixed it up (by adam2016)
by Bopaki
What does this error mean:
 
MyCAssignmentOprOverload\main.cpp... main.cpp:29: error: name lookup of `i' changed for new ISO `for' scoping ] C:\Dev-main.cpp:27: error: using obsolete b...
[8 replies] Last: Thank you very much to all of you!!! My program worked very well after... (by Bopaki)
by eci0x
Latin square
 
Hello! I have an assignment in which I have to check if an entered 2D array is a latin square, such as 1234 4321 2413 3142 I know that I need to make a b...
[2 replies] Last: Hello eci0x, Found this that might be of some help http://www.cpluspl... (by Handy Andy)
November 2017 Pages: 1... 678910... 33
  Archived months: [oct2017] [dec2017]

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