Beginners - May 2016 (Page 25)

how can i fix the random symbols im getting when i pass a varriable through my constructor
 
I have updated my constructor now i dont get compiler errors but when i run it i get random symbols where a name should be. The issue is with the second constru...
[1 reply] : [quote=My compiler] cout<<name ; // warning: array subscript is above ... (by Peter87)
Use a class member function to assign a value to a variable
 
Hello everyone, this is my first post here and I've tried searching everywhere for it, but perhaps I'm wording my search incorrectly. The problem I'm having is...
[1 reply] : I already solved my own issue. I simply changed grad::totalTuition() t... (by iguanish)
Taking in a double - space between symbol and number.
 
Hello, while taking a number to double, double a; std::cin >> a; If I type in -1 , a gets the value -1. But if I type - 1 , a gets the value 0. (Notice space ...
[2 replies] Last: Thanks! I will try string stream! (by ephraimr)
bitwise shift
 
I need a really simple example of a bit shift either << or >> with int y = 0; as start point
[4 replies] Last: #include <stdio.h> int main() { int y = 1; y = y << 7; y -=... (by programmerperson1)
Need Help for my operator << code !!!
 
I have a problem that about operator<< in LargeInt. When I Run this program. operator always print 1 end of any number. for example, I input 12. it will output ...
[no replies]
Confused
 
I'm am making a code to find votes, amount of votes and percentage. but whenever I try to find the percentage I get inf. what am I doing wrong? #inc...
[2 replies] Last: yeah it worked thanks. (by Quique562)
Maximum subarrey for begginer
 
Hi! I have to write a program, that finds the maximum subarrey, from 8 number sequence, but I don't know how to make proper alogorithm that does that. Every he...
[1 reply] : Google and Wikipedia are always a good place to start with common CS p... (by Duthomhas)
Help me rewrite the second constructor so it works properly.
 
I had to write this for a class and its not working rite. I am having trouble passing the const char through it. #include <iostream> #include <iomanip> #incl...
[2 replies] Last: so i can add the last little bit to explain what its supposed to do (by lyonm513)
new to c++ counting numbers +
 
heolp help! i'm new to c++ and i need help to write a new program i guess a simple one that counts numbers would be good i know printf() and some other funct...
[7 replies] Last: #include <stdio.h> int main() { int y = { 4, 6, 11, 12, 23, ... (by programmerperson1)
by Skylar
Arrays-HW Question need help finding error in code
 
Hello you might of seen this question before: The history teacher at your school needs help in grading a True/False test. The students' IDs and test answers ...
[2 replies] Last: Oh wow I should of noticed that, this is why you take naps. Thank you. (by Skylar)
Printing ifstream
 
So inside main it asks for a password followed by an if statement that calls a print function: //Open password file password.open("E:\\College\\2016 Spr...
[4 replies] Last: Oh! Alright, what's the best way to reset it so it reads from the begi... (by omn0mnomm)
issues with passing a variable to my employee constructor]
 
I cant figure out how to do it right but i cant pass my name through the second employee construtor when i call it in int main() #include <iostream> #inc...
[1 reply] : «issues» you get a compile error, then post it verbatim. Also, one ... (by ne555)
Help?
 
I know this question is probably the most stupidest question ever asked on this website. But, If I input "1" how can I output it as "01"? :P
[1 reply] : https://stackoverflow.com/questions/1714515/how-can-i-pad-an-int-with-... (by Moschops)
Class Template Inside Of Class Template
 
How do you declare a templated class inside of another templated class in such as that you can use it like this (where b is a templated class inside of clas...
[6 replies] Last: Thank you so incredibly much, that is all, thank you! (by da peppester)
by jtorry
Beginner - Program is crashing
 
Hi all, (using visual basic) Really new to C++ and i keep getting the following error : "A problem caused the program to stop working correctly. Windows ...
[1 reply] : scanf("%d, &nickels"); Take a good look at that line. Then, learn... (by Moschops)
by Kman
Calling operator<<?
 
My program is telling me my Book class doesn't have an operator<< function even though it does. I'm trying to call it from my BST program. I did #include the Bo...
[7 replies] Last: Got it. Thanks for the help, guys! (by Kman)
Storing a linked list into a vector?
 
I have to store data from a file into a struct with linked list in it. This is what I've done so far struct Class { int term; string subject; string ca...
[1 reply] : bump (by crimhaze)
problem with passing a variable though the class constructor
 
I am having trouble getting the second constructor right for the class i created called employee. At the bottom i included where i call the function in int main...
[2 replies] Last: You have put the asterisk on the right side of the variable name when ... (by Peter87)
common type
 
Hi, I just found out how the common_type traits is being implemented and I don't really understand one part of it. This is the magic line that picks the common ...
[2 replies] Last: Ohh I think I finally understand now :) Tnx a lot man!! (by etrusks)
Help a beginner in the programing world.
 
Hi! First of all i would like to say that i'm just starting my adventure with C++ and overall programing. So, i have a question, how do i build a program to ...
[2 replies] Last: Thank you for your reply, i forgot some basic things, haven't programm... (by Kisielos10)
May 2016 Pages: 1... 2324252627... 36
  Archived months: [apr2016] [jun2016]

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