Beginners - November 2010 (Page 31)

Programming C++ involving averaging using voiding?
 
I don't quite get how to use void function in order to organize a program, and not sure how I can use it with this one. Basically I need to to create a program ...
[1 reply] : Tackling your separately, the 'point' of a void function could be many... (by jamesmk)
Why wont my loops repeat?
 
Can anyone help me figure this out? #include <iostream> #include <cstdlib> #include <ctime> using namespace std; int main () { srand ( time ( NU...
[3 replies] Last: It still has some sort of glitch that I can't find! When pile gets to ... (by gardinerca)
fout multiple lines from a file to a new one
 
first things first, i searched this site extensively -- i may have missed the answer, so maybe someone could point be in the right direction. i am trying to ...
[1 reply] : Try moving the open()ing of fout outside of the while loop so it is on... (by Zhuge)
Stuck on a while loop
 
Hello. My goal is to read data 6 pieces of data from a file, with the first piece of data declaring how many other pieces of data are in the file. For example, ...
[5 replies] Last: Ifstream has a member function to go back to the beginning rather than... (by HooklessFastener)
General ? about how electronics are programmed
 
I just starting out with C++ and i was wondering how, lets say your house oven, is programmed. What piece of equipment do you need to buy to connect sensors, l...
[2 replies] Last: Allen, sure it's possible. It's kinda ambitious for a first project b... (by jamesmk)
2 Questions: Memory Leak and Error
 
I'm trying to come up with some code that will bring the substring functionality to a cstring, and I've got two questions. Here is my code. const char* str...
[2 replies] Last: Thanks for the help, Disch. I ended up going another way, but it st... (by jamesmk)
deconstructor run time
 
Hi everyone ,i wrote the following code where i a use a class to declare a friend function of overloaded operator +.Inside my class i have a pointer and althou...
[4 replies] Last: Thanks Phil,indeed the code runs just fine! The assignment operator wa... (by kikirikou)
menu loop problem
 
Hello all, I am new to c++ as you may have guessed. I am working on creating a program that has an input menu.My problem occurs when ever I call the addToArray ...
[4 replies] Last: Hey thanks for the help, it at first did not seem to fix my problem. I... (by notyalc)
by afrg
class member function and private member problem
 
hi I'm trying to create a member function of a class which takes a variable of the class type and uses its values to output a string. heres my constructor: I...
[2 replies] Last: I see, so my constructors are not constructing anything?? I also h... (by afrg)
by rain
How to add large negative integers?
 
following code prints me 2 instead of -4294967294. Is there any way to add such negative integers? #include <stdio.h> int main() { signed long long...
[9 replies] Last: Look my last code, it got all changes, I added LL and also tried ll a... (by rain)
Problem with function overloading
 
I cannot believe that I am writing this, because it concerns something that I believe that I understood properly years ago. The code below will not compile in ...
[6 replies] Last: the signature isn't the same in the derived class though is it, it has... (by quirkyusername)
Why doesn't this work?
 
I was making a program that takes a two-dimensional array of chars that can be either '#' or '.' from a text file and makes it work like tetris. '#' are blocks ...
[4 replies] Last: Thanks! (by airman9519)
[Solved]Program to count the number of lines in a file doesn't work
 
Hi! I'm working on a program that will count the number of lines ( where a line is everything before a '\n' control character ) in an ASCII file. Here is...
[2 replies] Last: Thanks, you've fixed my problem! :) (by JoshuaS)
by Kyon
Adding together numbers.
 
Heya, I'm having trouble with a very simple problem; adding numbers. Here's my code so far: #include <cstdio> #include <vector> template<class T> T sum(st...
[6 replies] Last: IIRC with G++ it works the way you say, but on MSC++ it doesn't even c... (by Bazzy)
Array not reading from File
 
Iam new to c++, iam writing this program with 3 files called header file, class implementation file and main cpp file. Iam using array to read from 2 files...
[no replies]
Break down
 
Assignment, typecasting, why one is different from the other and not just listed as steps of polymorphism. I know to get a good answer you need a good question,...
[no replies]
by yuugib
Inputting values in array and outputting them in descending order
 
Hey guys, I have been reading the forum for a while, but I couldn't find anything that could help to figure out my current assignment. Its a very simple prog...
[2 replies] Last: Thank you, I fixed the input and it seems to be working fine now! :) ... (by yuugib)
Webpage Link Mapping - C++ School Project
 
Hi I'm new to C++, and I'm now in Programming 2 at my school. We have a project that has the following requirements. Webpage Link Mapping: The program accep...
[1 reply] : Hi there, What you want is a web-spider - these can be both simple ... (by Philip Lee Bridson)
by Killa
Reading into a 2D array
 
Hey all, new here, I'm attempting to read a file into a 2d array and am getting rather stumped, whenever I run the soon to be posted code it compiles fine, howe...
[7 replies] Last: Well I have fixed the runtime error by changing mazesize to mazesize... (by Killa)
Matching words between files
 
I'm trying to write a program that reads text from one file and determines which words from that file were found and how many times they were found in another f...
[no replies]
November 2010 Pages: 1... 2930313233... 42
  Archived months: [oct2010] [dec2010]

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