Beginners - February 2011 (Page 31)

Reading fom data file with multiple columns
 
In course of my long assignment which should include arrays of classes, sorting, etc. I need to get my information from regular data file and read it into arr...
[6 replies] Last: Thank you, got you. (by Gardemarin)
Simple Concordance
 
Hi, I'm a new student in programing and I have this project of writing a concordance program and I don't really know how to do it. The program is to ...
[2 replies] Last: Check this out to drop the '#': http://www.cplusplus.com/reference/str... (by Computergeek01)
by TNT
Interest Problem
 
#include <cstdio> #include <iostream> #include <cmath> using namespace std; int main () { double l, apr; int t; int formula; bool ...
[1 reply] : Anyone can help me? This is my last problem (by TNT)
Array Arithmetic
 
Hello, I'm new to this forum and somewhat new to programming in general. I'd like to start off by saying yes, I have looked around to find solutions, but the p...
[5 replies] Last: Yeah, I knew I would screw it up somehow. Most of it I thought I was ... (by darthbaker)
nested looping in c
 
write a program that prints the following patterns Use nested FOR loop to generate the patterns. * ** *** **** ***** this is what i have where am ...
[3 replies] Last: ok thanks so much. Sorry about how i asked the question but its how my... (by shattarodger)
by TNT
Another Problem
 
#include <iostream> #include <cstdio> #include <cmath> using namespace std; int main () { double dollars, amount, interest, formula; int days, r...
[3 replies] Last: @Grey Wolf: got it Thanks (by TNT)
what's the problem?
 
#include<iostream> #include<iomanip> #include<stdlib.h> #include<cmath> using namespace std; class square{ private: double side; double area; dou...
[5 replies] Last: You should set it to some standard value, like 0. (by Kyon)
calculating n-order determinant
 
even after rewriting the algorithm from the scratch twice i cant get this write can someone point out my fallacy? #include<stdio.h> #include<math.h> #d...
[8 replies] Last: Try #include<iostream> (by CppSpartan)
File problems
 
I'm trying to make a code that reads numbers (between 1 and 500) from a file named: numere.txt and writes in the numere.out file the biggest 2 digit number and...
[1 reply] : if(x<min) min=x; a =0; is your problem. a = 0 happens regardless ... (by hamsterman)
Matrix generation in C++
 
I have the following code: for (int w=0; w<10; w++) { //some lines of code unsigned long num = x.to_ulong(); cout << "Decimal form is: " <...
[3 replies] Last: umm. for(int i = 0; i < 16; i++) for(int j = 0; j < 16; j++) ma... (by hamsterman)
for loop statement has no effect
 
I don't understand why I am getthe warning "statement has no effect" on the folling line: for(rightMarker; rightMarker >= leftIndex; --rightMarker){ th...
[3 replies] Last: Makes the warning go away and you got one useless statement less.... (by OldNewProgrammer)
maximum, minimum and average of a matrix?
 
std::vector<std::vector<unsigned long> > matrix(15); // 15 rows typedef std::vector<std::vector<unsigned long> >::iterator it_type; it_type row = matrix.beg...
[2 replies] Last: main problem is, for (i=0; i<m; i ++) { for (j=0; j<0; j++0) h... (by blessed87)
by TNT
Does anyone can fix this problem?
 
#include <cstdio> #include <iostream> using namespace std; int main () { int speed; int hour; int distance; bool notValid; int...
[4 replies] Last: Additionally, you should use cin.get(); instead of that system("pau... (by mainframe639)
Putting class and main in one file
 
I have a class which works fine when I use a separate header file, class file, and main file. However, I was told I needed to put the class file and main file ...
[2 replies] Last: Oh, wow! How simple is that? Thank you so much. I am a noob who has... (by cppmatt)
power minus
 
I wanna write code to show the value of 2 power -5, if I do like this, it gives correct answer. if(b<0) { for(int i=1;i<=-b;i++) ...
[2 replies] Last: I see thanks :) (by Ma Myat Thinzar Soe)
c2678 compile error
 
i get an error for the following code error C2678: binary '+' : no operator found which takes a left-hand operand of type 'const char ' (or there is no acce...
[1 reply] : Check out http://www.cplusplus.com/reference/clibrary/cstring/ I di... (by closed account 3hM2Nwbp)
trying to fill an array... LOST with what to do next
 
Hi everyone, I am trying to fill this array for my COMP lab and have the grades be given from user input, 3 grades each for 4 students. I do not know where t...
[no replies]
Passing References. Different ways
 
Whats the difference between these 2 things void addOne(int* i1){ i1 += 1; }; int n1 = 5; addOne(&n1); and this void addOne(int& i1){ i1 += ...
[7 replies] Last: jsmith that was a good read. (by mothmann)
Problem with calculatoion
 
It compiled, but there's an error in the formula to convert farenheit to celcius. No matter what I put in, it always gives me ___ Degrees F = -0 Degrees C ...
[3 replies] Last: Just as an aside... Some people like to put in extra parentheses to... (by jsmith)
Classes problem
 
Im working on a class with fractions. I have a method called plus that takes another fraction as an argument and returns the sum of the receiver and the argumen...
[4 replies] Last: Well I tried that and it worked. Thank you sadavied. (by eklymkow)
February 2011 Pages: 1... 2930313233... 43
  Archived months: [jan2011] [mar2011]

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