Beginners - March 2012 (Page 6)

by craime
hallow
 
hi guys who can help me with ma code blocks its doesn't work correctly when i try to run my program they tell me that its ain't built yet thnxx
[1 reply] : Have you... Built your program? (by ResidentBiscuit)
Errors in the following code?
 
What errors are in the following code int *p, *q; p = new int ; *p = 2; for (int i=0; i<5; i++) p = p[i-1] + i; q = p; delete[ ] p; fo...
[1 reply] : No, there aren't any others. (by Athar)
.c_str() and fstream issue
 
So my professor gives us a code to use for our homework with arrays, and I understand arrays well enough, but how the code he gave us works is another story. Fr...
[3 replies] Last: Your professor deftly handled the EOF issue, but he still shouldn't be... (by Duthomhas)
ifstream into contructors
 
I have two text(.txt) files (books and cards) that read: Art of War Sun Tzu 0195014766 1 0 explanation of above: title, author, ISBN #, status of the book, ID...
[17 replies] Last: I think you need to ask the question: When should I update book.txt? ... (by cire)
Printing to larger numbers
 
hi guys, I am meant to write a program to print the largest number out of a series of 10 numbers. Now a second question ask that i modify the code to also prin...
[2 replies] Last: @whitenite1 thanks for the input. haven't tried it yet but when i do ... (by Emmanuel11)
queue within a queue
 
how can i store a queue of type integers within another queue of type queue. #include <iostream> #include <queue> using namespace std; int main() { ...
[6 replies] Last: myqueue.front().pop(); (by Stewbond)
why C++ sudenly stop working ?
 
this is no error, it start to run until hit output function: void fout () { myfile << Rtime << '\t' << velocity << '\n'; } running stops and Microsoft W...
[5 replies] Last: When a program suddenly stops working , it can mean 1 of 2 things: 1... (by closed account zb0S216C)
Help needed for function-definition
 
Hello today i was programing my text game, and for some reason this error keep showing up: a function-definition is not allowed here before '{' token. Here is t...
[4 replies] Last: Omg im realy grateful thx :D (by closed account 23h0pfjN)
calculator program
 
can anyone tell me why my GPA comes out wrong? // ------------------------------------------------------------------ // File name: calculateGPA.cpp // ...
[2 replies] Last: thanks man. moving qualityPts out fixed it (by byronflds)
Insertion sort help
 
I am trying to implement an insertion sort on STL lists. My implementation runs fine until it reaches a certain value and it just removes a couple values from t...
[no replies]
output multiple files by loops. Please help
 
I have got some help with this topic. but still can't solve it. I need to output 4 data files for each different value of ka={0, 1, 2, 3}; each output fi...
[5 replies] Last: thanks a lot, it works. I simply need to change 'app' to 'out' in m... (by ppcandy)
by fsanzi
element insertion in an array
 
here's my problem. i need to insert a value in an array before an element which has the same value as "x" (which is read from the keyboard). i tried to solve it...
[2 replies] Last: I started purusing your code and noticed this: In line 25 you create ... (by Stewbond)
delete
 
...
[no replies]
Replace text on same line
 
I've made a countdown timer and it works fine. At the moment it displays the time till 0 on a new line (4...3..2...1....) but I want it to just have one time on...
[2 replies] Last: you can simply use carriage return without a line feed then try to ove... (by jl21)
Need help with fibonacci and factorial program?
 
It uses recursion I think? It is well laid out and easily readable. Basically it has a menu with 3 options, and the user picks one and it does the function, the...
[2 replies] Last: Two things : 1: Put your code in [ code ] tags 2: at least ATTEMPT t... (by georgewashere)
PLease, help with this problem!
 
These are the first sentences of my code (I can ensure there is nothing before). #include <fstream> #include <iostream> using namespace std; #define n 4 ...
[2 replies] Last: thanks veeeeeery much. Now i understand... I saw the light! (now i hav... (by hades80)
by cshu
question
 
I dont know if this is a dumb question or not, but if a file doesnt build successfully can it still compile?
[2 replies] Last: As far as I know that the build process is compiling then linking. If ... (by jl21)
Slower allocation second time?
 
In my game I noticed that my levels were loading slower the more I loaded them. GameState has a Level object pointer which gets initialized in the constructor ...
[2 replies] Last: It seems I've jumped to conclusions too fast. The screen hanged, so I ... (by xander333)
ERROR: LNK 2019
 
Hello again. I am getting an LNK 2019 error to the following program. What am I doing wrong?: #include <iomanip> #include <iostream> #include <fstream> us...
[5 replies] Last: Yes! It worked. Thanks alot Stewbond. (by RookieOfTheYear)
setprecision help
 
here is my code in the sales summary at the end i am not sure where and how to put the setprecision so that it works for all of them... also can someone tell me...
[1 reply] : Your array has a size of 8, so valid indexes are only 0 to 7, not 1 to... (by LB)
March 2012 Pages: 1... 45678... 71
  Archived months: [feb2012] [apr2012]

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