Beginners - November 2015 (Page 37)

undefined reference to vtable for triangle
 
confused why I'm getting this error, I thought I had every virtual function in my ABC "shape.cpp" defined in triangle. I'm thinking it has something to do with ...
[3 replies] Last: When a Triangle is destroyed ~Triangle() and ~Shape() will run, in tha... (by Peter87)
rm utility
 
So, I've been rewriting some simple command line utilities. Like echo, cat and rm. Just for the excercise. They are, as you may have guessed fairly simple to re...
[1 reply] : http://www.cplusplus.com/forum/windows/27121/ (by closed account 48T7M4Gy)
Finding and Printing index of arrays
 
I'm currently stuck on the final part of my homework assignment for intro to c++. I'm having difficulty getting my program to output the cost. I can't seem to f...
[1 reply] : As a first step why not hard code the mass-cost table with a few value... (by closed account 48T7M4Gy)
getline and char conflict?
 
I'm playing around with C++ and trying to make a small program that shows a variable, lets you change it, then shows you after you've overwritten it. But getli...
[3 replies] Last: #include <iostream> #include <string> #include <string.h> using name... (by closed account 48T7M4Gy)
Issues with some simple code problem
 
Hello im trying to make a program that is very simple based on these parameters: -Write a C++ program to get the input of number of tickets for an amusement ...
[1 reply] : it looks like you are on the right track but you do need to remove the... (by Hirokachi)
Infix to Postfix using stack
 
In my data structures class, I have to implement an algorithm in c++ to convert an infix to a postfix expression. The algorithm makes sense to me outside of one...
[2 replies] Last: http://www.cs.man.ac.uk/~pjj/cs212/fix.html (by closed account 48T7M4Gy)
by Mars57
New to c++, need advice finding the correct tools
 
Hi, I've recently become interested in learning c++, but I'm having some trouble getting started. I need to know whats the best (most suitable) IDE & compile...
[3 replies] Last: Adding to that comprehensive advice: http://www.cplusplus.com/forum/ar... (by closed account 48T7M4Gy)
Video Game Player Program Help
 
So I am trying to write this code that only accepts 10 inputs into the array. But when I put the 10th input it crashes and I am very stuck. Here are the specs a...
[2 replies] Last: Put the code tags in! (by kubatcha)
How to simply make my questions random?
 
So I am writing a program that will help me practice for my driving written exam, I want the questions to appear randomly otherwise I would memorize the order f...
[7 replies] Last: You're on the right track! In DMVTest01(), have a loop that g... (by koothkeeper)
by AP1144
Array question please help
 
Answering the following problem regarding arrays My code so far is below. I am having a trouble compiling and dont know what to fix Any help would be greatl...
[3 replies] Last: #include <iostream> #include <cmath> using namespace std; void read_... (by closed account 48T7M4Gy)
How to make "general" functions
 
I'm working on a simple program with a friend. I wrote a few I/O functions to plug into the program (they just read from/write to txt files). I'm planning to ad...
[5 replies] Last: Classes aren't the only things that a header file can contain. In fact... (by closed account 48T7M4Gy)
Easy Way To Do Switch Statements?
 
Write your question here. I want to shorten my switch statements, or maybe if there is a different type i should be using instead of switch. The code outputs...
[2 replies] Last: switch (direction) { case 1: cout << "You have chosen to go Left!... (by closed account 48T7M4Gy)
by Marth
Check if char is in array?
 
user inputs char char c; cin >> c; Now I have an array with an alphabet in it. A thru Z. Want to create a check to see if user inputted a correct ...
[5 replies] Last: In other words, using a standard ASCII table, the value of character ... (by closed account 48T7M4Gy)
Getting -nan (IND) error when calculating
 
Everything works except for my mortgage calculation (called MP) . I labeled it in bold. It comes out as -nan(IND) Please help, I have been stuck for 11 hours. ...
[1 reply] : You should also use code tags http://www.cplusplus.com/articles/jEy... (by YFGHNG)
Im very new and this code although easy is confusing the heck out of me
 
-Write a C++ program to get the input of number of tickets for an amusement park. Each ticket costs $ 5.50. Every fifth ticket is free. If any person is less t...
[3 replies] Last: You actually don't need <cmath> for any of what you're trying to do. T... (by YFGHNG)
I'm having issues with my Rematch condition.
 
Write your question here. void ResetGame(bool doResetPlayers) { char reMatch = ' '; bool doResetPlayers = false; Draw_Border_MenuFormat(); ...
[3 replies] Last: Hey it looks like you are trying to understand a homework assignment b... (by Hirokachi)
by mwskz8
Correct ways and Best way to malloc a struct?
 
I've seen different ways to malloc a struct, but I'm confused which way is the best way to do it. (Please add explanations when your give your opinions.) Th...
[5 replies] Last: sizeof(retVal->data) is sizeof(double *), which may be different from ... (by helios)
moving nth number to front of queue
 
I have an assignment where I need to create a queue stored in an array and write a function, moveNthFront that allows the user to choose which element of the qu...
[1 reply] : I had to enlist the help of C++ software engineer with 10 years of ex... (by southgoingzax)
by halciu
Volume of a Cylinder. The result is off by one decimal point.
 
I need to write a program to compute the Volume of a Cylinder by Repeated Addition. This is what I got so far: double radius, hight, volume, pi = 3.1416,...
[2 replies] Last: This just so happened to turn out this way because you used two equal ... (by ShiftLeft)
What is the fastest way to convert a rounded double into a string ? (no trailing zeros, no spaces)
 
Hi everyone, I'm looking for the fastest C++ routine to convert this double into a string. The number must be rounded to 2 decimal places, no trailing zeros...
[6 replies] Last: thanks! perfect as always! (by vindiou)
November 2015 Pages: 1... 3536373839... 53
  Archived months: [oct2015] [dec2015]

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