Beginners - February 2010 (Page 11)

Inputting file by dropping it on executable.
 
I made a program that inputs a file, and outputs another. To do this I used: fileIn.open("fileIn.txt"); ofstream fileOut ("fileOut.txt"); Using this way to...
[3 replies] Last: Okay, I am able to input a file, but now the output isn't working. o... (by EvanEjk)
Create a File - Troubles
 
Hello everybody! I am new to c++ and have a (curious) problem while writing a file using the ofstream class. I am working on Monte Carlo simulation but my pr...
[2 replies] Last: Thanks to have tried to solve my problem! I still don't know how to fi... (by Grincheux)
by Anda92
string
 
I'm from Romania.I don't work at school in C++ only in Pascal.I have some questions in C++ so please don't ignore me.
[1 reply] : I must built a function which receives an integer and a vector string ... (by Anda92)
Create and manipulate objects?
 
I'm stuck with creating objects on the fly. I want to do something like: class projectile { ... } int counter = 0; if(leftclick) { projectile projx...
[1 reply] : Use an std::vector of projectiles. (by firedraco)
by EEVIAC
choosing a compiler
 
Just started reading C++ Primer Plus 4th Edition (Copyright 2002) I'm totally new to programming. There is some sample source code in the book that I want t...
[5 replies] Last: @ Duoas thanks (by EEVIAC)
I'm Stuck. And Confused
 
I'm in an intro to c++ class and I am stuck on my current lab. The assignment is to make a rock, paper scissor game described below. ************************...
[1 reply] : USE CODE TAGS. #include <iostream> #include "CinReader.h" using ... (by iharrold)
Passing pointers/references to a function for efficiency confusion.
 
I understand that passing an object to a function by pointer would be efficient, because you're just sending over an address using "&" instead of the whole obje...
[3 replies] Last: By default every thing is passed by value to functions. That means the... (by kevinchkin)
New
 
I am new at C++ what are some things that I should start with?
[2 replies] Last: I recommend starting off watching antirtfm videos. (by p9h)
cant make 2d array hold data
 
hi every 1 i was hoping some 1 might be able to help me out i've run out of ideas. I have to create a o and x game for my C++ assignment im going to fail this c...
[3 replies] Last: managed to figure it out just before i checked in back here but warnis... (by speedmaster)
Binding an array
 
Hi to all, I'm new to this forum and to this programming language... i've got a problem with my thesis, I'm working with NS-2 and i need to bind an array of in...
[3 replies] Last: Well, that is correct -- from the Tcl side. The interpreter makes ha... (by Duthomhas)
if else and switch statement
 
I'm trying to create a if else statement within another if else statement or can i create if else statement within a switch statement? advice........
[5 replies] Last: You can only switch on integral types, so you could do part of it. (by Zhuge)
by ALB
how to do these in a array
 
Read file into array Find average using array Sort array Print array am confused
[1 reply] : show code (by Zhuge)
Trouble with Multiple Files
 
I have a program that has multiple files. I but all of the libraries I wanted to include in a header file called header.h. I have a color.h file too that I keep...
[4 replies] Last: Because the C++ standard says so. It has to do with how programs in... (by Disch)
Write a method to count the number of items in a linked list
 
If I wanted to make a method to count the amount of items in a linked list, how would I go about doing that? I want to make both an iterative solution and a ...
[11 replies] Last: Thank you so much! (by kyleg033)
by pmzf
complex arrays
 
Hi, I basically want to read from a notepad file a series of numbers (e.g a 300 by 2 array), where the first number is the real part and the second number i...
[1 reply] : I would suggest using a vector of complex<double> to store your values... (by Warnis)
by rijia
Write/Save int* to and Read from binary file
 
Hello! I have this code: int main() { unsigned int *dWords = NULL; int wordCount = 0; cout<<"The number of words to load: "; cin>>wor...
[3 replies] Last: http://www.cplusplus.com/forum/beginner/11431/#msg53963 Good luck! (by Duthomhas)
log in program (password question)
 
#include <iostream> #include <string> using namespace std; int main( ) { string userEnterPassword; string password( "hello" ); cout ...
[3 replies] Last: It is really amazing how often this kind of question comes up. But mo... (by Duthomhas)
Can't instaciate double pointers?
 
Hi. This works the first time but if it tries do run the else clause i get a bad_alloc exception.How come I can't do this? if(m_lMap == NULL) { m_lMap =...
[4 replies] Last: m_lMap is in gloabal scope, MapHandler has the variable as private. ... (by crimshaft)
Van der Waals Equation
 
I have created a program, but I can not get it to match the sample run provided. Any suggestions? I really just need someone to look over, it could be something...
[12 replies] Last: http://cplusplus.com/reference/iostream/manipulators/fixed/ (by jRaskell)
by tr3go
"Pointer" confusion...
 
Hello, I haven't programmed in awhile and I have seemed to atrophied any knowledge on structuring a program. I apologize. I'm doing some problems in the back...
[2 replies] Last: If your confused with pointers Try this http://www.cplusplus.com... (by olredixsis)
February 2010 Pages: 1... 910111213... 32
  Archived months: [jan2010] [mar2010]

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