Beginners - January 2010 (Page 2)

2 questions about files
 
For some reason when I use the following code, all the Person's in my file get NULL'ed up to the one being written. Any ideas what's wrong with the following: ...
[13 replies] Last: This is why I tried to avoid posting all my code because it scares ppl... (by cartpauj)
if/else comparing fractions
 
i am a complete newbie so bare with me and attempt to get past my foolish looking code. this is my problem I have a problem with comparing and displaying frac...
[1 reply] : For determining whether one fraction is greater than the other simply:... (by kevinkjt2000)
by vlad61
aint working..
 
#include <iostream> using namespace std; int main() { float a,b,result; cout<<"\n Enter a number: "; cin>>a; if (a=5) {cout...
[4 replies] Last: then does spacing in some code matter? because thats the only differen... (by vlad61)
by Muner
Can't make a Triangle
 
#include <iostream> #include <string> using namespace std; void printLine(int); void printTriangle(int); int main() { int height; cout ...
[1 reply] : line 55: return; is incorrectly in the for loop. It needs to be ou... (by closed account jLNv0pDG)
by cppbeg
new cmd windows
 
scdccs
[3 replies] Last: That just creates a new console. Using that, you have not way of commu... (by helios)
Header Tutorial!
 
Hello please introduce a tutorial(Free E-book) for learning all header files in borland c++. Thanks.
[1 reply] : http://www.cplusplus.com/reference/ (by helios)
Cstring - Inserting element
 
How can I create a separate function to add a character (prompt user to enter a character) to my ElementA & display the result? I will have to make use of cstr...
[3 replies] Last: http://www.cplusplus.com/reference/clibrary/cstring/memcpy/ (by R0mai)
need assistance with Age Counter program
 
okay so I'm just starting to learn Turbo C.. My professor assigned us to make a simple program that counts ages, (0-18 is infant, 19-29 is young, 30-50 is middl...
[1 reply] : Oh dear not getch() again.... getch() is not part of the standard c++ ... (by kevinkjt2000)
Need asistance asap
 
well im trying to make a program that calculates the overall rate of heat loss from a cylindrical tank, given the dimensions of the tank, the thermal conductivi...
[1 reply] : A and r0 are always 0.0. Is this what you intended? (by jsmith)
code interpretation
 
Hi, I have troubles with understanding of the following code double **zweidmatrix(int zeilen, int spalten); void free_zweidmatrix(double **matrix, int lin...
[5 replies] Last: func3 is a function, it doesn't point anywhere. See this: typedef... (by Bazzy)
by svexo
Reffer to a other function
 
Hey all how can i reffer from main to submain #include <iostream> using namespace std; int main () { // Does some stuff // needs to call submai...
[3 replies] Last: int main () { submain(); // call submain } (by Bazzy)
by aash
diamond shape
 
how can we make a diamond shape by using nested loops only......??
[9 replies] Last: Start by making a triangle. (by moorecm)
making a Simple Math Library
 
i have to make a Simple Math Library with a Vector class, Matrix class and a node class i have all the info i need to do it, but i have 3 errors and i need some...
[5 replies] Last: ok looks like this now #include <iostream> #include <math.h> ... (by deorcar)
algorithm
 
I am using jean meeus's astronomical algorithm's formula : int = whole number. if (month > 2) leave month and year unchanged if (month == 1 or month == ...
[8 replies] Last: But C99 is not part of C++. Here are some basic Rounding Algorit... (by Duthomhas)
by sukhi
hi....
 
can someone please correct the errors of the below given program... i've marked the errors that my compiler showed... #include<fstream.h> #include<iost...
[11 replies] Last: It looks like some old code you got somewhere around the internet or s... (by unoriginal)
using else if
 
do you have to use if(x == 3) { } else if (x == 4) { } because i always use if(x == 3) { } if (x == 4) { } i never tho...
[7 replies] Last: Ah of course. I didn't get to re-read this post after I replied last t... (by gcampton)
Not understanding functions!
 
I'm pretty new to the c++ language and programming all together. I was wondering since functions are a large part of programming if anyone can give me some bas...
[1 reply] : Start by reading over this: http://www.cplusplus.com/doc/tutorial/f... (by Return 0)
by roniy
a simple HW question :
 
here is the question : Write a program that generates an Employee Payroll Report. The input for the program consists of a collection of data containing the la...
[2 replies] Last: You can use arrays if you ask the user the number of employees and the... (by kevinkjt2000)
Tutorial question regarding pointers
 
In the tutorial it has this example talking about pointers: // more pointers #include <iostream> using namespace std; int main () { int firstvalue ...
[13 replies] Last: @helios: Can you teach me how to divide by zero? (by kevinkjt2000)
Cut off numbers/words
 
Hi people, I'd like to know if (and how) you can cut off numbers and words. Example: I have: double = 1.23456789 How do I cut off till I have 2 (or 3) decim...
[2 replies] Last: Thanks =) Now I remember I've seen that before =D (by Zeldami)
January 2010 Pages: 1234... 24
  Archived months: [dec2009] [feb2010]

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