Beginners - January 2010 (Page 3)

by joegi
ofstream filename
 
Hi, I have a program where I need to periodically output some data to an external file. That is to say, each 10 iterations I want to save the info in sequen...
[6 replies] Last: Sweet, now is working fine. Thank you very much for your help. C... (by joegi)
by cdummy
C++/easy tasks for beginners
 
Hi, I am looking for easy C++ tasks (if there is answers is OK :))? Thank you in advance!
[4 replies] Last: haha, the radio active vampire bunny is evil.. (by blackcoder41)
string.find for multiple matches per line
 
hello all, this is my first post here. I need help regarding searching and replacing strings on a textfile on multiple matches per line. For example i ha...
[2 replies] Last: if we change it to while, it will cause an endless loop. but you gave... (by floppyjr)
Struct Arrays and Functions
 
Hi there, I've been having problems trying to pass a struct pointer array in dynamic memory to a function. Could anyone please help me with where i've gone w...
[2 replies] Last: ah yeh... i kept presuming it was wrong because i got even more errors... (by Invertedzero)
Question About Headers and Compiling
 
The last time I compiled a program and used it on a computer other than the one I compiled it on, it ran errors over what I am guessing was a missing header fil...
[5 replies] Last: it doesn't compile the code exactly, it takes the definitions listed w... (by gcampton)
by sukhi
hi....
 
may i know how data file handling can be used in a program such as the one below.... please suggest. #include<iostream.h> #include<conio.h> #include <cty...
[3 replies] Last: Maaaaaan I remember turbo C!! That thing was so cool back in the day! ... (by kevinkjt2000)
by Zweli
dividing
 
Hello, I want to know why programmers sometime use for example: X = (variable * 21845) << 16. instead of: X = variable / 3 I know that (21...
[3 replies] Last: For the sake of correctness, your example should rather be: X = (va... (by lloydchristmas759)
allegro problem
 
im trying to use allegro and when i typed up a simple program in it, it gave me alot of compiler errors. but the biggest reason to that is this - alplatf.h: N...
[7 replies] Last: Maybe in 2007 it was a matter of time. Now it's a reality. (by helios)
by jagy96
Area under curve recursive call crashing
 
I am trying to find a way to estimate the area under the curve of f(x) between 2 points a and b. I evaluate f at the endpoints of the interval, and use them to ...
[4 replies] Last: Actually I just threw that out and decided to go with my instincts on ... (by jagy96)
STL list C++ sort and delete :)
 
struct node{ int num; int num2; }; list<node> list; list<node>::iterator iter; node temp; temp.num = 10; temp.num2 = 20; list.push_back(temp); h...
[6 replies] Last: oh ok i got it, thanks (by newNode)
Arrays printing out random characters.
 
Hey, I am attempting to build a simple tic-tac-toe program. I haven't been programming long, and appear to have bumped into this problem. This is my code: v...
[7 replies] Last: ok, hope that helps you anyway. (by blackcoder41)
subclass object on superclass
 
I am wondering if this is possible. I want to make an object of a subclass to the superclass. class Superclass { public: virtual void doS...
[8 replies] Last: That's it! Thanks Bazzy, your a big help! (by olredixsis)
for(;;;) ?????
 
I was looking through some old code and stumbled upon this: for(;;;) { commands ... } What does for loop do? More specifically I would like to know i...
[3 replies] Last: true. it's much like while (1), do / while (true) or for (;;) (by gcampton)
Cracking System()
 
I would like to start by saying that I'm posting this in the Begginer section because I feel like a Noob asking it. Question: How does the system() function...
[15 replies] Last: C:\WINDOWS\dir a) There's no such program by default. b) You can't k... (by helios)
Clearing the istream
 
I don't like using ststem("PAUSE"); to pause my program, so instead I use something along the lines of cin.get('\n'), and tell the user to press enter. The p...
[4 replies] Last: Maybe try using cin.ignore? http://www.cplusplus.com/reference/iostre... (by kevinkjt2000)
by dps
Selection of 5 points from n points or nC5
 
I want to select 5 points from n given points exhaustively. in other words i want to do nC5 in C++ but not getting a simple solution for this. Please reply with...
[2 replies] Last: If you want permutations, you can use std::next_permutation. If you w... (by jsmith)
by ZueS
[TUT] For LOOP
 
Well I know that some people have trouble with the 'FOR LOOP' so I am here to Explain. int count; for(count=1; count<=100; count=count + 1) cout << count <...
[7 replies] Last: Return 0+1 Let's have a button where, if several people vote to delet... (by tummychow)
base ^ exponent
 
I want to be able to display (BASE ^exponent = answer) 10 times. I want to increment the exponent each time through the loop as well and get a new answer. What ...
[4 replies] Last: So all I had were the data types wrong? Thanks for the help, much appr... (by hopesfall)
noob question (adding more options)
 
Hey there! I am new on this forum and I have started with c++ some weeks ago, although I've had previous programming experiance. I am trying to make a conso...
[2 replies] Last: okay, I'll try that thank you very much! (by LimePatch)
Program With Float Values
 
This may seem to have a very easy answer, but I'm totally confused. I'm trying to write a program gets two float values from the user. The program should output...
[6 replies] Last: answer = num1/num2; This actually won't work -- num1/num2 perform... (by Disch)
January 2010 Pages: 12345... 24
  Archived months: [dec2009] [feb2010]

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