Beginners - April 2020 (Page 15)

Help with error
 
am getting expected ')' before my if else statements. [code if (guests 25<) { cost_cake =(SHEET_CAKE); } else (guests <=25) ...
[3 replies] Last: Hello softballer3, Bear with me this is just a copy and paste. PLE... (by Handy Andy)
by gVd9
Whats wrong with this
 
I don't know why is not working? a. Declare an integer constant SIZE to store the number of numbers b. Declare an array of numbers with size SIZE c. Fill the...
[3 replies] Last: PLEASE learn to use code tags, they make reading and commenting on sou... (by deleted account xyzzy)
Coin Toss Function Problem
 
Good morning, I have this assignment to do, I have to do a coin toss function. However, I have a little problem. For example, if I ask the program to generate 2...
[4 replies] Last: @Handy Andy, @Learner2, @lastchance: Thank you all for your help, I a... (by senorGoat)
Getting the values in an array into a pointer (1,2)
 
I have an array of values stored in p , then I try to copy the values into array , and later on I want to store the value from array into another_p . #i...
[34 replies] Last: Hi salem c, Sorry for being so careless, I thought that line was extr... (by kbklpl21)
Removing default output from console program
 
Hello, I am programming a simple guess the number program however,when i compile and run the program after successfully running the program the last output thi...
[2 replies] Last: You could always try it from a console prompt and find out. (by salem c)
Using functions to generate a specific output
 
1. How do I fix the following code to print the mark per subject with it's corresponding symbol and code on separate lines? 2. How do i fix the code to print d...
[8 replies] Last: Thank you! You guys are wonderful people! (by veryConfused)
'if' function rookie question
 
I was messing around with if function so I ended up with the code below #include <iostream.h> int main() { int x = 4; if (x = 70 && x == 4) co...
[3 replies] Last: #include <iostream.h> Notwithstanding jonnin's post, you're probably... (by mbozzi)
Vector containing object
 
Hi, Trying out an online tutorial, and then changing it to suit me. I finally got through all the syntax issues, only to be greeted with a lovely Linker error...
[6 replies] Last: Yes, this worked! Many thanks all for your help! (by Thunderchook)
by darego
deleting node from Binary Search Tree not working
 
I have a BST which is made up of Nodes containing City objects. I am trying to implement a deleteCity(double GPScoord1, double GPScoord2) function which deletes...
[4 replies] Last: Do you know of any code examples using a queue I can look at that? I a... (by darego)
How do I get the value of a pointer?
 
I've been working on some project code and the project is basically to read in a file that has contacts in it, put the data into nodes, put those nodes into a l...
[6 replies] Last: Okay, I got it. I used my printNode() function in the loop before it r... (by KittyIchigo1)
C++ Reading data by character from txt
 
250 250 14 190 87 164 180 175 195 185 176 154 14 169 205 252 178 184 169 92 166 180 14 187 175 192 185 178 180 175 176 224 Hello friends, I have a txt file...
[5 replies] Last: Remember that the best way to allocate a 2D array is to allocate the d... (by dutch)
by kkat
infinite loop not letting me redefine variable
 
Hey! I've never posted on here and I am VERY new to c++, I don't know vocabulary and I'm extremely frustrated with what I'm currently dealing with, lol. So basi...
[2 replies] Last: thank you so much! Yeah I got the rest of the code sorted as well, but... (by kkat)
kindly convert into c++
 
#include <iostream.h> #include <conio.h> void main() { clrscr(); int x = 10; int y = 2; int sum, difference, product, quotient; sum = x + y;...
[2 replies] Last: What he said, in action: #include <iostream> //fixed //#include <co... (by jonnin)
by gVd9
Can you help me with this
 
i have one homework, but they do not explan arrays. a. Declare an PRODUCT_COUNT constant to store the number of products purchased in-store. b. Declare a PRODU...
[4 replies] Last: Hello gVd9, PLEASE ALWAYS USE CODE TAGS (the <> formatting button),... (by Handy Andy)
islapha not working
 
The isalpha function is not working at all I keep getting the message: "there is no matching function to call to 'isalpha'(const string&)" What I want it to...
[7 replies] Last: later change them to lower case letters. No need to know whether eac... (by deleted account xyzzy)
by hbcpp
Calling member functions using member pointers from non-member functions
 
#include <iostream> using namespace std; class A { void foo() { cout << "Arrived foo" << endl; } void test(); }; void baa( auto (...
[2 replies] Last: @keskiverto thanks, that worked. That profound question though, I did... (by hbcpp)
by tarn
Algorithm
 
Hi guys im not very sure how to write the algorithm for this code Thank you in advance! #include <stdio.h> #include <ctype.h> // toupper(), tolower(), isupper...
[2 replies] Last: If you are restricted to the English alphabet, the logic is: - get ‘... (by Enoizat)
Prime Sieve
 
Can somebody explain why I am getting a runtime error when I am calculating prime sieve up to 10^6 & 10^5? It is working fine for 10^4; #include <bits/s...
[6 replies] Last: @lastchance Thank you. I got it. Here is my updated code which is runn... (by tetraxx)
User Input compared to Object array element
 
I posted the whole thing but what I really need help with is creating the printSalary function. He wants it to be able to go through the array and print names...
[2 replies] Last: What the printSalary function aims to do is look into the array and pr... (by dwill129)
True/False Test Score Calculator
 
I'm almost finished with this program but something wrong is happening with the calculations. This program reads from an input file, which lists the correct ans...
[7 replies] Last: wow, :O thats cool haha (by GamerAid)
April 2020 Pages: 1... 1314151617... 20
  Archived months: [mar2020] [may2020]

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