Beginners - February 2013 (Page 52)

Is this const in the function parameter redundant?
If I add a const before a function parameter, that means I will not change the parameter within the function: int get_age(const Dog& dog) { return dog.ag...
Feb 8, 2013 at 3:48pm
[3 replies] Last: The " const " in either context mean the same thing more or less. If ... (by closed account zb0S216C)
What's the difference between shared pointers and normal ones?
According to the docs, shared pointers allow for many objects to own another object (I think?). http://www.cplusplus.com/reference/memory/shared_ptr/ And ...
Feb 8, 2013 at 3:22pm
[3 replies] Last: [quote=johnhoffman]Oh.. what if I make a shared pointer that points to... (by LB)
IOStream.h Error
I dont get whats happening... I have put all this in resource.h. What is wrong with my code? #include <iostream.h> #include <stdlib.h> #include <stdio.h> i...
Feb 8, 2013 at 3:21pm
[2 replies] Last: Thanks, but now the game doesnt work properly... (by cooldude102)
No Match for Operator >
The following is an insert sorting algorithm that is part of a larger program. I have refined this program to the point that I only get this one error. P...
Feb 8, 2013 at 2:44pm
[4 replies] Last: It means that the compiler doesn't understand what 'greater than' mean... (by MrHutch)
Trouble with my dynamic array
I've been up all night trying to figure this out and I've gone nowhere. How do I set up and use a dynamic array? I skimmed through a billion and one websites an...
Feb 8, 2013 at 1:44pm
[3 replies] Last: Well, what you need to do is create a dynamic array for each element o... (by MrHutch)
by tupher
HELP PLEASE
How could this be work?? if (boo=="rat"); { SlowPrint("The Rat Tells: ", ...
Feb 8, 2013 at 12:51pm
[2 replies] Last: It doesn't work. if (boo=="rat"); { SlowPrint("The Rat Tells: ",... (by Chervil)
Warnings
Why do I keep getting this warning? warning C4091: 'typedef ' : ignored on left of '__w64 unsigned int' when no variable is declared warning C4091: '' ...
Feb 8, 2013 at 11:35am
[1 reply] : How is the typedef used? (by Peter87)
it keep give in me the same result ! (image)
hi there .. i tried to create program to calculate average of n numbers .. and when i run it , it keep give in me 0 no matter what .. the code .. #...
Feb 8, 2013 at 10:46am
[3 replies] Last: glad to help.. (: (by mirec)
HELP! what have i done wrong?!
PLEASE PLEASE PLEASE HELP ME!!! i have no idea what i'm doing wrong. Below are the instructions for my school assignment as well as my code so far. whenever I i...
Feb 8, 2013 at 9:53am
[3 replies] Last: > whenever i put in a value where the number of cans is smaller that t... (by JLBorges)
Password program
I'm having my problems with my password program, it doesn't recognise the word for some reason //------------------------------- #include <iostream> #in...
Feb 8, 2013 at 9:41am
[3 replies] Last: Thanks a bunch, really appericiate the help (by Code Apperentice)
by faele
I\O read txt file
hello , sorry for my english...In my project i have a problem .. i don't know what the problem... the exe don't read txt file... bool leggi_da_file(char* ...
Feb 8, 2013 at 9:18am
[4 replies] Last: and this is set classes #include "classe_persona.cpp" #include "clas... (by faele)
C++ simple loop question
Hi, I'm having trouble figuring out the answer to this question. The output for this Code is suppose to be. i is 5 5678 i is 9 _ I do not understan...
Feb 8, 2013 at 8:17am
[3 replies] Last: Great explanations. Thanks. (by SinisterGrin)
What have I done wrong?
Dev c++ will not compile this. In my first set of if else statements, it says it expects a semi colon before the string literals. #include <iostre...
Feb 8, 2013 at 8:13am
[10 replies] Last: else if (time2>time1) Can I suggest that you don't... (by TheIdeasMan)
Retrieving object members from pointer vectors
Hey guys, I'm working on an assignment, in which I read strings from text files, and based on these strings create objects. The strings are stored in the format...
Feb 8, 2013 at 7:57am
[2 replies] Last: How silly of me. The problem has been solved. Thanks for the help! Wha... (by nobrainer)
by Ch1156
Understanding the computer internally?
Ok sorry i dont need any help with code but i was thinking if i got a better understanding of whats going on inside the computer it might help me with programmi...
Feb 8, 2013 at 7:28am
[2 replies] Last: I want to learn how to use C++ efficiently, especially when working wi... (by Ch1156)
Help. Boolian with chars?
I am teaching myself here and I am working out of a textbook that asks me to create a program that asks for 2 numbers and then takes input of a s d or m to do s...
Feb 8, 2013 at 7:16am
[3 replies] Last: Wow, I knew I wasn't 100% today, THANK YOU! I swore my compiler was ... (by kilrothy)
Histogram with pointer/arrays
Wow Im rusty at this. I have to use my second function to create a histogram of test scores. #include <iostream> #include <string> using namespace st...
Feb 8, 2013 at 6:05am
[1 reply] : Btw, I realized I hadn't put the function call in. I did that and stil... (by Octoballa)
Returning Strings in a Function
It's been a while since I've worked with C++ and am shaky at remembering how to use arrays properly. I need to return a string from a function but for some reas...
Feb 8, 2013 at 6:00am
[10 replies] Last: You can return an array as long as you know how that array's memory is... (by closed account S6k9GNh0)
the problem with the class template
#include <iostream> using namespace std; template <typename T> class vector { public: vector() { first=0; second=0; } vector(T first, T se...
Feb 8, 2013 at 5:32am
[2 replies] Last: #include <iostream> // using namespace std; // *** avoid template <... (by JLBorges)
by quaw
any help would be great
hey guys so I'm having this problem i don't fully understand c++ but I'm trying, so what I'm trying to do is a program that where you could calculate the x and ...
Feb 8, 2013 at 4:19am
[4 replies] Last: i dogged around and finally made it work thanks for the help tho (by quaw)
February 2013 Pages: 1... 5051525354... 67
  Archived months: [jan2013] [mar2013]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.