Beginners - May 2019 (Page 12)

Use of enum in array of structures
 
You are required to create an array of struct type students. In which you are required to store the gender of the student using the ENUM. Also, you need to use...
[3 replies] Last: Yes, like I said before, you have to do the conversion to a string you... (by Ganado)
Count knot with one successor in Tree
 
Hello! Please someone to show me. How to count knot with one successor in the tree? Am i need a two count search function? This is a function to count with two...
[1 reply] : You need to change the condition on line 5. Right now it checks that ... (by Duthomhas)
by frza45
Length command and variable not declared in scope
 
I wrote a program to test my skills in using classes and now I'm stuck. I'm basically doing input validation right now. The third do while loop is giving me som...
[10 replies] Last: Do you really need a string? int year = 0; while ( std::cin >> year &... (by keskiverto)
C++ linked list user input out of bound validation causes program to end
 
I have a delete node based on position function and I am trying to do validation with the logic that the user input will repeat itself whenever the user's input...
[2 replies] Last: You leak memory at lines 3, 4, and 20. And if you delete anything othe... (by dhayden)
condition continuation question
 
Hi guys,can someone help me with this code? I don`t understand why,after I`ve died (If I fail to kill a dwarf) program still continues to the next statement!? ...
[4 replies] Last: Thank you very much Jonnin!! I can see it now! that is my problem...bl... (by NeonDolphin)
About index starting from zero
 
Is there any detailed mathematical meaning or purpose for the index of array starting from zero and ends in (n-1) instead of starting from 1 and ends in n? ...
[7 replies] Last: Is there any detailed mathematical meaning or purpose for the index o... (by MikeStgt)
Access second to last element of Vector Array
 
Hi, so i started (Re-)learning C++ a while ago (My original knowledge was very limited anyway), and i need to be able to read the last, and second-to-last eleme...
[2 replies] Last: Thankyou for the reply Repeater. Sorry for my confusion over 'Vector'... (by Jimmy2174)
Constructor
 
I am starting a project that will be my first using inheritance, and I am currently on the base class called creature. Here, I need to have a default constructo...
[7 replies] Last: Thank you! I appreciate the insight. (by stoneJax)
About Template
 
what is the scope of the keyword template? is template only affect the class or function closest to it? template <typename T> T mymax(T x,T y){ ...
[2 replies] Last: > what is the scope of the keyword template? > is template only affe... (by JLBorges)
Classes help
 
Hello. I saw a post on the same assignment earlier, but was hoping to get help on my current code as well. The problem is to convert 20 integers read in from a ...
[8 replies] Last: Thanks for the input. I'm not quite advanced enough to understand that... (by closed account jEb91hU5)
no match for ‘operator=’
 
Hello, maybe somebody can help me, I have these errors: Individual.cc: In member function ‘void Individual::setGene(int, Rama)’: Individual.cc:39:33: error...
[6 replies] Last: I see that I must steel persevere in my c++ Besides I put the inicial ... (by psosmol)
by suprax
In String only letters?
 
Hello everyone, i got a, maybe silly, question: how can i only read letters in? I want to start a query, where the user have to input a name, but he/she ...
[7 replies] Last: Thanks a lot! I understand everything very well. (by suprax)
by mary02
taking # as char, producing *
 
Hello. My problem is to take in a word character by character. With this, any digit (yes, taken in as a character as well) needs to output that many '*' symbols...
[5 replies] Last: Can I only do that if it is less than 10? A question of mine would be,... (by jonnin)
Trying to add search
 
I'm trying to add search to my console program but I can't seem to find a way to do it right. I've tried it several ways. I was wondering if anyone could pl...
[1 reply] : Hello novice12, You should compile your program before posting it. Th... (by Handy Andy)
by Bopaki
Program compiles OKAY but bombs out when running it
 
I want to move the front element of a queue to the back of the queue. The program bombs out with this message: 1732 1767 1734 1764 1766 Assertion fail...
[6 replies] Last: There is something seriously wrong with the function: move_to_rear ... (by dhayden)
Reverse Alphabet no arrays
 
I was wondering how to write code that would take user input, such as 'A', and mirror that. A would be Z, B would be Y and so forth.I cannot use arrays or strin...
[3 replies] Last: thank you both! it makes so much more sense than everything I had trie... (by alphabet22)
Convert Integers to Roman Numerals using Classes
 
Problem: Write a program to read 20 numbers from a file and convert them into roman numerals. I need a class that will hold the numbers in private data and c...
[3 replies] Last: ah. it looks like your class is supposed to be a single value --- aki... (by jonnin)
by suprax
Sorting with Vectors?
 
Hey guys, actually i got a little problem with my code. In fact it should be easy, but the output of the program is not like it should be. #include "myEr...
[5 replies] Last: Sorry for writing back so lately, meanwhile i solved the task. ps.:... (by suprax)
Coin program not calculating correct results
 
Trying to have an American coin calculator than asks you how many coins you have for each value and then gives out the total(sum). After tweaking and looking u...
[5 replies] Last: Hopefully I don't come out being completely idiotic. You did already... (by MikeStgt)
incomplete type
 
Hello, I have a lot of errors but of the same class I think Chromosome.cc: In constructor ‘Chromosome::Chromosome(Individual**, int)’: Chromosome.cc:12:29:...
[3 replies] Last: Also, your constructors make no sense. One of them thinks sequence is ... (by Repeater)
May 2019 Pages: 1... 1011121314... 16
  Archived months: [apr2019] [jun2019]

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