
please wait
by kingsamuraix
help with code
|
im trying to develope a program that determines gross pay not including overtime. Pay rate must be between $1-$100 The tax rates are as follows: >= 2500.00... |
Feb 5, 2012 at 7:32am
[2 replies] Last: Wow this is rough. Are you taking a class for C++? Or reading a book/t... (by ResidentBiscuit)
|
by cyberteen
cannot include vectors
|
Hi everyone, I am just a mere beginner in c++. I am trying to include vectors for one of my school project. Bu it seems, i dont have the vector.h file in my in... |
Feb 5, 2012 at 7:26am
[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 this int **p= new *int; // sorry second question, int *... |
Feb 5, 2012 at 6:56am
[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: void* voidarray; In addition to this pointer, I... |
Feb 5, 2012 at 6:49am
[1 reply] : I guess you could do voidarray2 = (char*)voidarray + offset; ... (by hamsterman)
|
by jokerfwb
overloaded >> operator function not working right
|
I have an overloaded extraction operator function that allows me to enter information for the member variables for my class. The problem i have is that one of t... |
Feb 5, 2012 at 5:33am
[2 replies] Last: #include <iostream> #include <string> using namespace std; int main(... (by histrungalot)
|
by ErinCorona
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 file and uses the numbers to manipulate an array. I have s... |
Feb 5, 2012 at 5:23am
[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 ; ifstream fin("data.in"); fin >> temp >> temp ; fin.cl... |
Feb 5, 2012 at 4:50am
[1 reply] : You are returning a pointer to something on the stack which is bad. S... (by histrungalot)
|
by KingAroan
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 file from where main is. The data has to be read from another... |
Feb 5, 2012 at 4:26am
[4 replies] Last: Not knowing what the total project is, start small and read in the con... (by histrungalot)
|
by johnhoffman
What is the point of declaring a vector length?
|
When initializing vectors, why declare their length? Is there an advantage to this? std::vector<int> numbers(10); Why not just std::vector<int> num... |
Feb 5, 2012 at 3:13am
[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> #include <cstdlib> #include <cstdio> #include <fstream> #inc... |
Feb 5, 2012 at 1:37am
[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 number rounded. Also I would like to do this only using cout... |
Feb 5, 2012 at 1:16am
[4 replies] Last: The floor didn't help so far, I looked up a bit on truncation, it wou... (by Wisely Done)
|
by gnolladvisor
Class Issue
|
I'm fairly new to C++, so to learn a bit through practice, I decided to make a simple little RPG-like turn based battle system. This isn't the exact code, but i... |
Feb 5, 2012 at 1:00am
[1 reply] : Instead of void attack(int &a) where you are passing an integer, you... (by Wisely Done)
|
by Bartek Sowka
My command line calculator problem(s)
|
ok my code is: #include <cstdio> #include <cstdlib> #include <iostream> #include <math.h> using namespace std; int startup() { system("title ch... |
Feb 4, 2012 at 11:59pm
[6 replies] Last: Not sure if it works, but try using stringstream. Something like this... (by Wisely Done)
|
by Bartek Sowka
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 int, inside the application, with the name of the value of ... |
Feb 4, 2012 at 11:48pm
[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 me through it? Create a class named Student that has three... |
Feb 4, 2012 at 11:06pm
[4 replies] Last: I know that. But how do you learn how to do something if you dont know... (by ProgrammingProblems)
|
by Yellowhottub
Linked Lists
|
Upon compiling my code I am getting the error: List.cxx: In function 'void build_list(std::ifstream&, char*)': List.cxx:72: error no matching function for call ... |
Feb 4, 2012 at 10:59pm
[3 replies] Last: I tried using the typedef everywhere and it works now, thank you for t... (by Yellowhottub)
|
by Stewbond
getline(ifstream, string)
|
One more question: I have the following file: AIRPORT GND TWR ARR DEP CLNC APRN EHAM 121.7 119.22 121.2 119.05 121.97 121.65 OMDB 118.35 118.75 124.9 124.45 ... |
Feb 4, 2012 at 10:40pm
[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 start what needs to be written? I am not a programmer and I can... |
Feb 4, 2012 at 10:36pm
[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 want them to move towards a gravitational centre (0, 0). As... |
Feb 4, 2012 at 10:12pm
[2 replies] Last: Thanks very helpful. I had already set up a data array and loop but us... (by closed account 2NywAqkS)
|
by yasar11732
About linking
|
Hi, I am new to c++ and also learning makefiles now. I have a concern about something, here is my makefile: IDIR :=include CC :=g++ -Wall CFLAGS:=-I$(I... |
Feb 4, 2012 at 10:03pm
[11 replies] Last: There is some difference between the two. http://www.gnu.org/software/... (by Peter87)
|