Beginners - September 2017 (Page 10)

if statement with math?
 
Trying to do use if statement to subtract 35 from the totalNet. not sure if i am using it right. I apologize for the messiness. Feedback on how the set up would...
[2 replies] Last: Note: the semicolon on line 35 in unnecessary. A more serious issue. ... (by keskiverto)
Help with number guessing
 
Here's my current code and I am stuck completing my playOneGame(). Could someone please guide me towards the right path? A sample run of the program might l...
[1 reply] : What exactly do you need guidance with? In a guessing game like the on... (by Uk Marine)
Storing objects in a linked list and sorting
 
For the life of me, I cannot find an answer to this question, partially due to my lack of experience and understanding. My question is, if I create a class t...
[9 replies] Last: Or, as earlier bool Person::operator<(const Person &rhs) const { ... (by closed account 48T7M4Gy)
question about vector
 
this is a question about vector object and it just a general question include "example.h" class : libaray example 1 //let say you have a privates ...
[3 replies] Last: Hello ghost1111, You have defined books as a private member variable ... (by Handy Andy)
constructor/this pointer help
 
Hello. Curious as to why I am getting the same output of: First name: (blank) Last name: (blank) Zip code: (blank) when using the default value of "X" an...
[2 replies] Last: doh!! Thanks. Looked over that quite a few times. Me so tired. Than... (by Billyin4C)
Help Dividing in C++
 
I need help with why my code won't display the right solution to the division I coded on line 25-28 #include <iostream> #include <cmath> #include <iomanip> ...
[1 reply] : Hello LyonPredator, PLEASE ALWAYS USE CODE TAGS (the <> formatting bu... (by Handy Andy)
I need someone to help me complete this coding school assignment
 
I am completely stuck on this C++ assignment for school. Is there anyone out there that would be able to spend some time and help me? thank you
[2 replies] Last: I am completely stuck on this C++ assignment I can't seem to find... (by mbozzi)
by manico
how to pass a char array to a template function
 
I am creating a simple program to output the position in the array of a char which the user inputs. If its not in the array, then "This value was not found in t...
[1 reply] : template <typename T> int arrayLocation(const T array1 ,const T size,... (by mbozzi)
Return value of 'getter' function when out of bounds?
 
Hi I have a class which contains an array and there are setter and getter functions to change/return the elements of this array. I have two queries: 1....
[1 reply] : 1. Both std::vector and std::string have two etters: the at() and the... (by keskiverto)
by Nico
Building a DLL (error adding symbols: File format not recognized)
 
Hello, I am creating a DLL that I want to build as 32-bit version and as 64-bit version. I am using the TDM gcc compiler, but I also want programmers that u...
[7 replies] Last: I’ve installed TDM-GCC 64bit to ensure I was following your steps (I... (by Enoizat)
by RNBW
Row of Ascii Characters
 
I am trying to display a row of Ascii characters (ref 219). But all it displays is one character. What am I doing wrong? // Display row of Ascii Characte...
[2 replies] Last: Hi Thank you for the prompt response. I forgot about the braces. But... (by RNBW)
Math equation coding help!
 
For my programming class, I am required to loop prompts for user input for the following equation: x= -3b plus or minus sqrt of (650-7c^2)(end sqrt)/ a-4c I n...
[6 replies] Last: ok sarah, apology accepted, we move on. come back if you need any more... (by closed account 48T7M4Gy)
Math Equation coding help again!
 
For my programming class, I am required to loop prompts for user input for the following equation: x= -3b plus or minus sqrt of (650-7c^2)(end sqrt)/ a-4c I n...
[6 replies] Last: Thank you to all who helped! My program is working how i want it to(wi... (by sea2017)
how do you check if T is a certain type ?
 
how do i insert certain values if my type T is a certain type , ie i want to insert the value 1 into the vector_set if the type is int , and i want to insert th...
[2 replies] Last: Use template specialization, or the typeid operator. https://en.wikip... (by goldenchicken)
by ZhuZhu
Getting sizeof pointer to an array
 
I am playing around with pointer to array. Saw this tutorial's code as below. I understand that sizeof(int) returns the number of bytes used to store an int, w...
[13 replies] Last: Remember that sizeof is evaluated at compile time and the result is a ... (by helios)
template and inheritance
 
I'm playing around, learning my way through class, and template. See below for a piece of my code for the class Array_1d_W which derived from Array_1d. pri...
[3 replies] Last: Alright thank you all (by Tontonbaboum)
try throw catch
 
I'm trying to write a program that prints the second smallest integer in a sequence and outputs an error message if there is no second smalles integer (e.g. in ...
[1 reply] : 1. Doesn't your compiler warn about the assignment on line 9? 2. Ev... (by keskiverto)
That's why i am still a beginner
 
i thought the console will solve "12"...but it solved "123"....can you explain why #include<iostream> using namespace std; int main() { cout << "123\...
[2 replies] Last: i got it...thanks (by phongvants123)
Entry Form Validation
 
I am trying to write a code to determine the eligibility of entrants into a marathon. My parameters are to enter a name, enter the age of said name, enter the g...
[7 replies] Last: One way to do it const int MALE = 1; const int FEMALE = 2; st... (by Thomas1965)
September 2017 Pages: 1... 89101112... 21
  Archived months: [aug2017] [oct2017]

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