Beginners - September 2015 (Page 42)

Return derived class reference!
 
Hi, I am having a little trouble to get the reference of a derived class. For example - class A { public: A() {} virtual ~A() {} virtual void...
[4 replies] Last: Yes, it also works. Thanks for the reply. (by Turbo82)
Is this possible with C++
 
I just recently learned the basics of C++, since I want to get to programming a game. My question is can I stick to C++ or do I need to change languages? From w...
[3 replies] Last: You don't need to change languages. Try using Allegro 4 library. A sh... (by Kevin C)
input output?
 
I'm getting a ton of errors, but don't know why could someone take a look at my code and offer me advice, also i'm pretty uncertain that this is the best way to...
[2 replies] Last: Some bugs are fixed by Ericool. Here are some explanations: 1. The o... (by tcs)
New at C++ And need help
 
I need help with a problem I have the majority of the code written, but I am running into some problems getting it to work properly. The problem is as follow...
[4 replies] Last: With your assistance, it works properly. Thank you all very much for y... (by DrkMagnus)
Need some changes with a function (C++)
 
Hi! I 'm new here. Well, i have some problems with my code. First of all, i speak spanish, so i might need to apologize if my english is not very good (also som...
[6 replies] Last: you're welcome. :) (by Ericool)
char array and pointers II
 
Still seem to be a difference in the way 'char array' and 'int array' are treated. When i execute the program below, printing 'q' will give the address of eleme...
[9 replies] Last: Here is a thread to help you understand , but mostly << is a method t... (by Ericool)
by suzuka
Basic Tables
 
I tried to make a basic table programme. Need improvement? #include <iostream> #include <conio.h> using namespace std; int main() { int table, count, an...
[3 replies] Last: Thanks (by suzuka)
by Chad22
simple "class" question
 
I am new to both c and c++. A few weeks ago I started learning c++ using MIT's online courseware (class number 6.096). Everything was going great until I hit ...
[8 replies] Last: MikeyBoy, this has been clearly explained by everybody, but it took yo... (by Chad22)
Star program using a do while loop
 
I am trying to make a star (*) program while using a couple nested do while loops. The only loops that I want to use are do while loops. The expected output ...
[2 replies] Last: have you try this : int b = 1; do { int a = 1; do { cou... (by Ericool)
char array and pointers
 
Lost the road somwhere here: I compiled an example from the book, thus testing pointers as *int. All went well. So i tried to do the same with a char array ins...
[3 replies] Last: Replace this line p = letters; *p = "A"; by p = letters; *... (by Ericool)
by szlose
Memory leak problem(s)
 
I'm programming a simple application and currently Im trying to get rid of all memory leaks. There are some that I cannot figure out. For example consider the c...
[2 replies] Last: Okay thanks, Ill keep checking, at least i know this code is not a pro... (by szlose)
overload constructor and accessor constructor issue
 
Having a problem with classes and vector interaction. So far I can tell in the void fillVector function that the overload constructor works in the sense that th...
[2 replies] Last: Thank you so much! I knew it was small but I just wasn't seeing that o... (by zacklucky)
by Zyety
Just started and theres some question
 
Write your question here. // my first program in C++ #include <iostream> int main() { std::cout << "Hello World!"; } This short code is s...
[4 replies] Last: main is a method , int is the return type of that function . So you ar... (by Ericool)
How to output which user inputted each value?
 
I'm working through the beginner exercises and have got to 'Pancake Glutton'. "Write a program that asks the user to enter the number of pancakes eaten for br...
[2 replies] Last: try this : #include <iostream> #include <string> #include <array> ... (by Ericool)
Bitwise AND in a condition
 
Hi, for my enumeration, I need to check the integer sum with a bitwise AND. class myClass { enum myEnum { intOne = 1, intTwo = 2, intThree = 4, intFour =...
[3 replies] Last: Ah that is it.. Thank you! (by Binary91)
How can string values be +ed?
 
I found some examples in the tutorial. which are : string concatenate (string a, string b) { return a+b; } ------------------------------------ str...
[5 replies] Last: by the way, I always put #include <stdlib.h> at the very first of my c... (by kevinkim)
Hash table
 
What is hash table and its applications? Hi All, I never use Hash table in my coding or any other design. So I am very qurious to know basics and some in...
[12 replies] Last: Arrays can not easily grow but lookup time is very less. i.e. O(1) Li... (by akash16)
Help with reversing order of my decimal to binary program?
 
Hello guys. I managed to do a program which allows you to input a decimal and it converts it to binary. But the problem is, I need the numbers to show up in a r...
[14 replies] Last: Less than? Operator<< isn't less than. It is bitshift. (by keskiverto)
by vaynex
Help with functions in a loop
 
I have this code that works and i am trying to do this: You must add a function to your program called CalcInterest. This function will take as its ONLY parame...
[1 reply] : > You must add a function to your program called CalcInterest. > This... (by JLBorges)
Help with random_shuffle
 
I am not getting the output i expected for the randomizing scores. Not sure why everything looks right. Any ideas. #include <iostream> #include <vector...
[4 replies] Last: std::random_shuffle() is deprecated and will be removed in C++17. In... (by JLBorges)
September 2015 Pages: 1... 404142
  Archived months: [aug2015] [oct2015]

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