Beginners - December 2010 (Page 22)

Odd Number Program with File Output?
 
Okay so what I need to do is write a program that would create a file called "odd.txt" that contains odd numbers 1-99, one number per line. So I wrote this c...
[1 reply] : fin >> x; while (!fin.eof()) { /*Here you don't touch fin*/ } In... (by ne555)
by pedges
Determining Big O notation
 
If I called a downheap on every element of a heap, what would the Big O notation be and why?
[1 reply] : Um... I hate to be suspicious, but this sounds suspiciously like a que... (by Albatross)
Problemo with classes
 
So im making a Frame class and everytime it´s called to make a new one, it is suppose to pass the given info into the new class object. Using SFML: So somet...
[no replies]
Mentor
 
Hey. I just started up here. I have three C++ programs due for my class in 1 week. I am not asking for anyone to write them for me or help me cheat. I am just l...
[2 replies] Last: I just finished the 1st assignment, but mainly my struggles are in dec... (by Pinnochio5)
Strings and Sorting
 
My code (below) is supposed to read in a list of numbers and names from a file. ex) 2942893 Bill Scott Jones 3823920578 Mark Thomas Sorensen 29310...
[no replies]
Program that Sorts an array and finds mean, median and more.
 
This is my homework for my C++ class. I have bits and pieces of it, however i cannot figure out how to sort an array from the .txt file that is required and use...
[no replies]
I am learning about contructors and keep getting errors
 
// construct and destruct #include <iostream> using namespace std; class clsFish { private: int iSize1; // size for dynamic array ...
[1 reply] : In your display function you try to use iSize2 but you don't pass iSiz... (by quirkyusername)
Pointers
 
I have an assignment for my first computer science class and I have it all pretty much done but I am doing something wrong. I am getting the correct maximum num...
[2 replies] Last: The first number in the file is the count for the numbers that follow.... (by crazy4byu)
Strings and Sorting
 
I am trying to write code for a program that reads from a text file that has 50 phone numbers and names. The format is number, first name(s), last name. ex) 2...
[6 replies] Last: I figured some out. Now I just need to know how to alphabetize by the ... (by crazy4byu)
pointers, dynamic arrays questions
 
Hi Everybody here. I am programming a calendar program using pointers and dynamic arrays. My input likes these: 1/1/2001 one 2/2/2002 two 3/3/2003 three 4/4...
[2 replies] Last: Thanks. But I know I can use object. But I wanna practice using pointe... (by gongzhen)
by wtf
Basic code obfuscation
 
I have: bool dew = true; if (dew--) dewsomething(); but I get invalid use of boolean expression as operand to operator-- I could change de...
[6 replies] Last: I see that if( dew && ( (*(char *) &dew)--) ) is even better than i... (by wtf)
txt file lenght
 
Gey guys could you help me to find the real lenght of a txt file? I mean with all enters , spaces etc fstream plik; bool Ustaw_Plik(){ plik.open("p...
[1 reply] : Fixed. Enter works as a two characters. Had to find every enter and t... (by alokado)
Strange Error
 
I have a program that has been working but suddenly stopped. I can't post the code, except maybe in snippets, but hopefully you can tell me what's wrong.When I ...
[1 reply] : I just feel like shanking myself now. My program randomly started work... (by Browni3141)
Minesweeper
 
temp removed
[1 reply] : well, we're not going to do it for you. when you run into a problem, f... (by hamsterman)
Problem with pointers
 
#include <iostream> using namespace std; template <class T> class maximum { public: maximum(T num1,T num2) { ...
[6 replies] Last: Thanks, I understand it now. (by eLancaster)
Function for integration
 
hey, i want to make a function for integration of expressions not for the trigonometric function(such as sin,cos etc). just for expressions like x^2+x^3, and h...
[2 replies] Last: do you want a numeric integration or a symbolic integration because th... (by Toothkiller)
Sorting an array of integers
 
Hello. I am trying to write a program that will sort an array of integers descendingly to their numbers of divisors and I have some problems. Here's what ...
[2 replies] Last: Yes, my comments are Slovenian. The code works, but the result isn'... (by majselx)
struct ... many of them
 
hello. i would like some piece of advice regarding how to look into my problem. i've got this struct {} which contains some integers and 1D pointers, for exam...
[3 replies] Last: so, the best way, i guess, is to use pointers ? Yes doesn;t this me... (by coder777)
Switch statement Program
 
Im having some trouble with a program. This program is supposed asks the user to enter name/or id of a planet and his/her weight. The program then outputs how m...
[2 replies] Last: ok thank you very much (by UMES Programmer)
assignment for class NEED assistance ASAP
 
here is my problem: Write a class that finds the average of an array of 5 test scores. Those scores are 98,73, 65, 41, and 89. The class should have varaibles...
[1 reply] : In order to get an indea of what classes are you should read this: htt... (by coder777)
December 2010 Pages: 1... 2021222324... 35
  Archived months: [nov2010] [jan2011]

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