Beginners - September 2011 (Page 8)

by Jimbot
Editing member variable of a shared object
 
Hello, I am having more problems editing member variables inside vectors of objects (similar to a previous question of mine: http://www.cplusplus.com/forum...
[7 replies] Last: Thanks again dangrr888! I'll check out that Myers book - sounds good... (by Jimbot)
What's going on here?
 
So I made a program that opens a file, then takes the users input and writes it to the file, then closes the file. No matter what you enter for the file locatio...
[5 replies] Last: i don't know about MAX_PATH macro, but wasn't it not logical to add 1... (by Zexanima)
by lirik
Equation result problem
 
Hey guys so I am messing around with log base e and I have been getting a different calculator answer compared to the compiler. double rm1,rm2, t1,t2, om1,om2...
[6 replies] Last: If you're referring to the distribution, I think you'll need an extern... (by Albatross)
int64_t compiler warning
 
Hi, all - Any idea why this code: #include <tr1/cstdint> const int64_t BIT_55 = 0x1 << 55; Would generate a compiler error "warning: left shift co...
[2 replies] Last: Hi, Disch – That compiled OK. What exactly does the LL do: does tha... (by mzimmers)
Help with Error LNK2019
 
Dear fellow Programmers, I have been having this problem with this program for the past few days, I can't seem figure out what I did wrong to make it act thi...
[1 reply] : Your prototypes don't match their definitions. More specifically, the ... (by closed account zb0S216C)
by codrgi
move values in an array?
 
header int my_array ; init my_array for(int i=0; i<21; i++) my_array = 100; //value 100 means no value set in array example; all values in my_arr...
[3 replies] Last: For starters, you are exceeding your array bounds. int my_array ... (by Disch)
by dkXIII
Hello World,
 
I am trying to learn C++, but somehow I think in C++, 'C' is a constant not a variable. Is this a correct answer? I think it is but I cant prove >.<
[3 replies] Last: [quote=dkXIII]I think in C++, 'C' is a constant not a variable. (sic) ... (by closed account zb0S216C)
by CIS
Computer guess my number
 
I can't figure out this code in chapter 2 beginning c++. I thought that it shouldn't be as different as the guess my number is they just switch rolls, but I can...
[16 replies] Last: I'm sorry to interrupt again but I had to make an edit. The program as... (by carebearboy)
Why can't constructors be called as followed
 
#include <iostream> #include <string> using namespace std; class DayOfYear { public: DayOfYear(); // initializes a null construct...
[4 replies] Last: Thank you. Makes more sense now. (by jazzin66)
how to get 2 loops to loop together
 
This is my goal :Print out a table based on the number of days the user enters starting at one. List the pay for each day, the first days pay is a penny, but th...
[2 replies] Last: #include <iostream> #include <cstdlib> #include <ctime> using namesp... (by carebearboy)
Getline String Help
 
I am new with learning C++. I have some basic C experience and currently teaching myself how to program in C++. I have a senior project for college that I am le...
[4 replies] Last: Thank you Gaminic. I thought about a switch case before, but didn't th... (by ajaustin12)
Code problems
 
Hi I have created a very simple program that acts as a calculator but the while loop keeps running and the function will not work :\ If someone could please ...
[6 replies] Last: sorry for hasseling the functions now work but the menu has stopped wo... (by rmccleave)
by tonnot
How to assign content to the superclass ?
 
I have a struct struct_A, basically it has some vectors and props, no functions. I have the classB, that has an internal instance of struct_A, created on the ...
[6 replies] Last: I think he's trying to extract the 'A' portion of a 'B' object, B bein... (by Gaminic)
Allocate Memory for Vector of a Structure
 
Hi everyone, struct activity{ int id; //Activity number int duration; //Duration of activity vector<int> resource_requirements; //Resource requirements ...
[6 replies] Last: Ok thank you very much I got it ;) (by airerdem)
Pointer passed-by-value
 
Hello, I am curious what the following code is doing with the parameters. Since in main, the a is essentially a pointer to the first element in the intege...
[1 reply] : Are you asking what is the difference between template <class T> void... (by hamsterman)
Help with modules!
 
I'm in a course called intro to C++ for C programmers, so I already have a basic grasp of C programming and am a few weeks into C++. We have to work with files ...
[8 replies] Last: hans, The instructions specify to use it. It's trying to transition us... (by Moe45673)
different result <c++builder, gcc, msvc++10
 
#include <iostream> #include <cstdlib> using namespace std; class myclass { int *p; public: myclass(int i); myclass(const myclass &i); ~my...
[8 replies] Last: may the error is in my system ill try re installing my os...coz last t... (by RSR102782)
Is There A Way To Hide Previous Text?
 
I was wondering if there's a way to clear text on a program. For example, when "y" is pressed to play again I want it to clear the text above it so it doesn't l...
[1 reply] : The console (the black window you see when using cout/cin) prints out ... (by Gaminic)
Why Does This Happen?
 
I was just trying some new things and I came across this. I was thinking "Could I use a string instead of an integer so instead of pressing "1" for yes, you pre...
[2 replies] Last: Oh I see! That works perfectly, thanks for the quick reply and awesome... (by BusinessSloth)
September 2011 Pages: 1... 678910... 48
  Archived months: [aug2011] [oct2011]

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