Beginners - February 2012 (Page 57)

help with code
 
im trying to develope a program that determines gross pay not including overtime. Pay rate must be b...
[2 replies] Last: Wow this is rough. Are you taking a class for C++? Or reading a book/t... (by ResidentBiscuit)
cannot include vectors
 
Hi everyone, I am just a mere beginner in c++. I am trying to include vectors for one of my school ...
[2 replies] Last: It's just #include <vector> no ".h"; in fact, If you're writing C++ ... (by Mathhead200)
by Rave
dynamically allocating pointers?
 
i have two questions, can you dynamically create a pointer, what i mean is: //something like th...
[4 replies] Last: // Look at the type following the "new" keyword. This operation allo... (by Mathhead200)
Void* arithmetic
 
Hello everyone, For a school project I am working on, I must use an array of unspecified objects:...
[1 reply] : I guess you could do voidarray2 = (char*)voidarray + offset; ... (by hamsterman)
overloaded >> operator function not working right
 
I have an overloaded extraction operator function that allows me to enter information for the member...
[2 replies] Last: #include <iostream> #include <string> using namespace std; int main(... (by histrungalot)
What am I missing in this second function?
 
I am pretty terrible with passing parameters, and I could use some help. My program reads in from a...
[2 replies] Last: I think the statement j<0 in your for loop is never true, since yo... (by biaspoint)
Warning: Pointer Return Function
 
Hello, I keep getting an warning because of this: int* input() { int temp ; ifst...
[1 reply] : You are returning a pointer to something on the stack which is bad. S... (by histrungalot)
Please help with this code.
 
My class is having us make a class in a separate header file, use the prototypes in a separate cpp f...
[4 replies] Last: Not knowing what the total project is, start small and read in the con... (by histrungalot)
What is the point of declaring a vector length?
 
When initializing vectors, why declare their length? Is there an advantage to this? std::vector<...
[4 replies] Last: Thank you! That is clear now. (by johnhoffman)
by Zeph78
Need some help and info. about buffer
 
Hey guys I was wondering if its possible to bounds check the buffer like: #include <iostream> #in...
[1 reply] : Since your code explicitly determines the size of your buffer "char sB... (by collator)
Formatting Output
 
How do you get the proper output of a variable, to only one decimal point, and not have the fractal ...
[4 replies] Last: The floor didn't help so far, I looked up a bit on truncation, it wou... (by Wisely Done)
Class Issue
 
I'm fairly new to C++, so to learn a bit through practice, I decided to make a simple little RPG-lik...
[1 reply] : Instead of void attack(int &a) where you are passing an integer, you... (by Wisely Done)
My command line calculator problem(s)
 
ok my code is: #include <cstdio> #include <cstdlib> #include <iostream> #include <math.h> us...
[6 replies] Last: Not sure if it works, but try using stringstream. Something like this... (by Wisely Done)
Store a int with a name specified while running the app. ...
 
Lets say I have: string i; cout << "str: " << endl; cin >> i; Now I want to create a new...
[3 replies] Last: That's a good question with plenty of practical uses. You can simul... (by closed account 3hM2Nwbp)
Class name student
 
I dont know what to do with this problem, I dont even know where to start. Can someone please lead m...
[4 replies] Last: I know that. But how do you learn how to do something if you dont know... (by ProgrammingProblems)
Linked Lists
 
Upon compiling my code I am getting the error: List.cxx: In function 'void build_list(std::ifstream&...
[3 replies] Last: I tried using the typedef everywhere and it works now, thank you for t... (by Yellowhottub)
getline(ifstream, string)
 
One more question: I have the following file: AIRPORT GND TWR ARR DEP CLNC APRN EHAM 121.7 119.22...
[4 replies] Last: Yes, the file was open. Edit: No wait.... I added this line after... (by Stewbond)
Write a program that accepts c string input
 
I need help with this programming problem. I have no clue what to do, please help me. Where do I sta...
[1 reply] : Have you gotten input from the user into a char s ; before? Have you... (by Duthomhas)
Calculating Gravity
 
So far I have a particle simulator that puts 10000 particles randomly dotted around the screen and I...
[2 replies] Last: Thanks very helpful. I had already set up a data array and loop but us... (by closed account 2NywAqkS)
About linking
 
Hi, I am new to c++ and also learning makefiles now. I have a concern about something, here is my...
[11 replies] Last: There is some difference between the two. http://www.gnu.org/software/... (by Peter87)
February 2012 Pages: 1... 5556575859... 64
  Archived months: [jan2012] [mar2012]

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