Beginners - December 2015 (Page 6)

Why do I need pointers?
 
Ok so I'm currently learning about pointers I have know the basics of them. int x = 5; int *p_x = &x; cout << p_x; //This will be a memory address co...
[3 replies] Last: You use pointers to point. That would allow you to form relationships ... (by ne555)
Problem with modifying array argument in function
 
Hello everyone! I've got some experience with Java and C, but I'm very new to C++. Therefore, I guess the answer to my question will be obvious, but I just can...
[10 replies] Last: Your first program was perfectly fine, it has only one error, at line ... (by Cubbi)
Template Function - Vector of Classes w/ Different Constructors
 
Hi, first post. I've recently been introduced to templates and am hoping to implement them into a project I am working on; however, I've run into a few problems...
[8 replies] Last: @TheIdeasMan thanks for the input. The initialization list was a val... (by Austinpp)
vector pushing back problem
 
no matching function for call to 'PlaylistsManager::PlaylistsManager()' new (from++) T(); ^ why do i keep getting this error? ...
[13 replies] Last: Hi, in my program, i want to disable pushbacking a PlaylistsManager ... (by TheIdeasMan)
Promoting The User To Enter A File Name
 
Hi there. I'm need to C++ so I hope everything is right so far. I basically need help promoting the user for a file name and opening the file name. I don't know...
[3 replies] Last: What does open file f mean? In everyday language, compare it with op... (by Chervil)
Opening a Stream?
 
I need help opening a stream. Sorry. I'm new to C++. #include <iostream> #include <fstream> using namespace std; int main() { cout << "Hi there. Ple...
[2 replies] Last: What does open stream s mean? (by NotACSStudent)
Double Stack HW
 
I have a HW on the dynamic allocation topic that involves a double stack. I dont really understand the assignment so here is the Q's, the .h file, the .cpp file...
[6 replies] Last: is this right?? No. And you know it isn't because it won't compile. ... (by cire)
Workaround using switch case
 
I am having a switch case, in which should trigger on a value.. The idea was that when the double lies in between a certain range, a certain case should be exec...
[5 replies] Last: ahhh! thanks moose! t should have been t1 :).. (by DrJones)
Hard coding? what is it?
 
Thank you for your assistance. I am trying to understand what hardcoding is. and is it good? I am being told I am always trying to hardcode, is there an easie...
[1 reply] : You've already asked this question in another thread (where I've just ... (by MikeyBoy)
by GTHell
Can't define a class "sales_item.h"
 
I've been looking thru the internet and can't find a solution. I'm stuck in C++ primer book chapter 1, 1.5.1 Program won't run #include "Sales_item.h" wit...
[3 replies] Last: The error message means that the file "Sales_item.h" doesn't exist. Wh... (by jlb)
garbage with correct output
 
code is compiling correctly problem is with the output the division = result + garbage is showing I tried a lot but that garbage is not removed.compile & see re...
[6 replies] Last: buddy !!!! you are too good........ (by biLmLik)
by c2po
array size unknown
 
Hello, I'm new to c++ and compiled languages in general..I made a mistake that did not result in a compile error (or execution error) and I was wondering why. I...
[8 replies] Last: Thanks again Chervil...very helpful! (by c2po)
nested for loops
 
Chaps I am stuck with a nested for loop exercise. Basically if you run my code I need to print mirror images of the 1st two. I have tried allsorts and I simply ...
[1 reply] : Sorry I forgot to mention the mirror images have to start with spaces.... (by jamesfarrow)
by cb32
replacing text on same line by inputting a or d
 
I'm trying to create a game that is sort of like space invader. I've made the UI and I want to start working on the movement of the spaceship. what sorts of cod...
[1 reply] : that's easy, is your UI created from array? show some code, we will ... (by xenoviaquarta)
what does const rvalue mean?
 
Hi, i can understand the term lvalue,const lvalue, lvalue reference,const lvalue reference,rvalue, rvalue reference and const rvalue reference, but i can't unde...
[5 replies] Last: i appreciate all your comments @Cubbi Thank you very much for your ... (by qishuhao)
Errors in header file
 
Hello everyone! I just started learning C++ and I've created a header file (generate_input.hpp) to use in two source programs (generate_input.cpp and generate_t...
[2 replies] Last: Thanks a lot! It works. :) (by hiephoi)
Help I dont know where to download C++
 
Hello i have an account and want to learn to code, hack, ect im a huge gamer but where can i downlosd C++!!
[5 replies] Last: A good book always helps too : http://stackoverflow.com/questions/3882... (by ephraimr)
by ratfus
Pointers, confusing little monsters
 
Why does a pointer to this memory location always have the same address? Shouldn't a different array number have a different pointer address or is an array sim...
[3 replies] Last: As Yanson said, line 12 should be cout << B << endl; (by chicofeo)
by nct
reading file ,searching word and storing the values corresponding to that word into arrays
 
hey guys i have a file in following form TIME= 0.00 9.00000 -0.67000 6.57270 9.00000 -0.65029 6.37938 ...
[3 replies] Last: How you read the file depends on the format of the file and what you i... (by jlb)
how do we compare multiple arrays and print the largest number?
 
I want to make a program which compares the indices of 3 arrays and then display the largest number amongst them. How can I make this? #include <iostream>...
[5 replies] Last: OP made the post before mine that said this: this should be the outpu... (by booradley60)
December 2015 Pages: 1... 45678... 43
  Archived months: [nov2015] [jan2016]

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