Beginners - August 2009 (Page 5)

by wtf
Global Fstream not working.
 
I can open it, and calls to .is_open() indicate the ofstream is open, but nothing is ever written to it. It worked when compiled under c-free but now its not w...
[2 replies] Last: Well whadyaknow? I added outfile.clear() to the beginning of main() a... (by wtf)
Problem with program not working.
 
Hello, I have a problem with a program. I'm using Borland C++ ver. 4.52. It's on a PC that's 200 Mhz. I put the following code in, and it works for a while -...
[1 reply] : Please use the format tags when posting code. The code looks fine t... (by kbw)
by hyene
RUN - TIME question??!
 
Hi to all, I`m relativity new ic C/C++ and I have one question about the run-time.When I compile my code and after that run the program i want to know if the...
[2 replies] Last: thanks about the help helios, now i `ll try to find what function abou... (by hyene)
by Null
What's this?
 
Just another thing I see for the first time: int i(0); anyone can explain? Thanks!
[2 replies] Last: Thanks (by Null)
by joshky
Vectors and Objects
 
It has been suggested I should use a vector to create an indefinate number of objects. I am having some issues making this work. I get a windows crash wheneve...
[3 replies] Last: Just FYI... class account{ public: void acc... (by jsmith)
static variables in namespace/classes
 
Hello, is it true that if you have the following : //Header file .. myNameSpace.h namespace myNameSpace { static int iMyInt = 0; }; and i...
[4 replies] Last: Yes, I have just read about that... But if we set inclusion guards... (by cppuser)
My little program does not work
 
#include<iostream> #include<fstream> #include<iterator> #include<algorithm> #include<list> using namespace std; int main() { list<int> foo; ifstre...
[1 reply] : Is there anything in the list foo ? Learning to debug your own pro... (by kbw)
by Brick
Feedback on my Tic Tac Toe C++ program
 
Hi i'm a beginner at c++ so although my program works i'd like some feedback on my code. So if you could have a look and point out anything sloppy ;). Its supp...
[2 replies] Last: Thanks for the reply. cin.ignore( numeric_limits <streamsize> ::m... (by Brick)
typedef and array typedef
 
is typedef changing the datatype, what of the array typedef iam a bit mixed up.
[1 reply] : typedef does not create a new type, just a synonym for an existing typ... (by kbw)
extern declaration error
 
Given the following ... In A.CPP: typedef struct { char author_surname ; char author_fore...
[5 replies] Last: I've resolved this as follows: HEADER.H typedef struct ... (by paoloricardo)
Counting words in a text file
 
I am near complete of my program. The only element that does not produce is the word counter. I believe my code is incremented correctly and would like a second...
[2 replies] Last: Sure did thanks~ (by byu1212)
getting header files from this site
 
sorry its late and im really new at this. I'm taking a C programming class and my professor got math.h from this site for use in his code. But I have looked a...
[3 replies] Last: Cool! the way my teacher explained the site, made it seemed like you h... (by ICANSEEYOU7687)
sscanf question
 
Hi Guys, Variable str contains this 304 ttys000 0:00.06 -bash Now in code sscanf(str, "%d %[^/]/%d %d:%d:%d %s", &pid, tty, &n, &hr, &m...
[2 replies] Last: Ahhaa. Thanks Duoas. I think I got it now except for one thing. So... (by kevinchkin)
how to pick a specific data in fstream
 
hi~~~~ i got a problem in the fstream~~~~~ the scenario is like this~~~~~ an user of a bank wishes to access his/her account~~~~~ he/she is required to in...
[6 replies] Last: sorry~~~~i get it what you mean already~~~~~ after trying to work out... (by loveless)
by joshky
Variable Names
 
I am wondering about programs that create multiple objects from the same class using indefinate iterations. Is there any way to use user input to name a variab...
[5 replies] Last: Is there any way to use user input to name a variable No.... (by mcleano)
Allocating and deleting a Pointer
 
Consider this code: // allocating and deleting a pointer #include <iostream> using namespace std; int main() { int localVariable = 5; int * pL...
[8 replies] Last: Still, Zhuge is correct... Line 11 will never be true. new will th... (by jsmith)
structure and a class
 
guys can you help me out what are the difference between a class and a structure?
[3 replies] Last: EDIT: yes, default inheritance is public for structs and private for c... (by jsmith)
need tips on how to make calculator work
 
Unlike my previous calculator this is supposed to do basic operations, but its not working. can someone tell me whats wrong? #include "stdafx.h" #inc...
[4 replies] Last: here is the working code #include <iostream> using namespace s... (by lekaimadh)
reading a key input
 
::CONSOLE APPLICATION:: I was wondering if there was a way to read a keyboard input Now read on I have a while loop that controls the 'game' while(play...
[1 reply] : http://www.cprogramming.com/fod/kbhit.html i'm not sure but it should... (by Null)
Using a database in VC++ or stick to textfiles?
 
Hey! Just as the title sais I want to save quite large amounts of data onto something so that i can load it the next time my program is run. I've done some ...
[2 replies] Last: Thanks for your help! cool, it's ole db I've been using in c# aswel... (by Nsanden)
August 2009 Pages: 1... 34567... 17
  Archived months: [jul2009] [sep2009]

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