Beginners - July 2009 (Page 10)

problem reading unicode file in C/C++
 
Dear all, I need to read a unicode file using C or C++. I have tried several pieces of code, but none of those seems to work. The following code, for example...
[3 replies] Last: FILE *in=fopen("C:\\InputFile","rb"); FILE *out=fopen("C:\\OutputFil... (by mackabee)
Headers problem
 
Hi, I'm working on a strategy game. I had large "unit.cpp" and "unit.h" files with many classes in them and everything worked fine, but I felt that I should gi...
[5 replies] Last: Thank you all. It works now. (by hamsterman)
array, map, multimap??? which to use
 
Hi,I'm trying to create a text rpg based loosely on the original Bardstale/Wizardy series games of the eighties(for learning c++).I've been stuck in one aspect ...
[7 replies] Last: Thanks jsmith, that would help condense a lot of unnecessary code. ... (by necrostalgic)
by chria
Problems with struct
 
Hi, I have a problem when I try to use a struct in my program. The program returns Segmentation Fault even now when I just declare a vector of it. What I ...
[15 replies] Last: Try to see if the error is related to the other vector you have in the... (by Bazzy)
[SOLVED] Triangle function
 
I am learning C++ on my own out of a book I recently purchased, but I cannot get this code contained in the book to work. The program is intended to total all ...
[2 replies] Last: Thanks for the help. (by jbwright84)
matrix algorithm
 
The exercise says: You have a NxN matrix with numbers from 1 to N (unsigned integers), it doesn't matter that any block has the same number, the target is t...
[4 replies] Last: Thank you, i'll try. (by rv53705)
Making a custom file format
 
Please answer my question only if it's not too complicated to explain in one post. Thank you.
[5 replies] Last: ?... Input/Output with files http://www.cplusplus.com/doc/tutorial/f... (by closed account z05DSL3A)
Feedback on small text-based game
 
This is just a small game I made, and only the first version because there is still so much more that can be done with it, but I was just looking for a bit of f...
[11 replies] Last: returns true iff health <= 0 and false otherwise. Yeah that's wha... (by mcleano)
by lare26
pointers in class
 
I was wondering if it is legal to put a pointer in a base class? And am I calling the pointer correctly. This is just a small sample of my program to get the qu...
[5 replies] Last: So I declare the pointer in the class declaration and initialize it in... (by lare26)
by garob
code does not work
 
This code does not work, can somebody tell me why? (fileName is a global string and linesInFile is a global vector of strings) #include <iostream> #incl...
[1 reply] : If you are asking why it doesn't compile, you spelled "stream" wrong o... (by Tevsky)
by wtf
How can I create a 'REAL' windows application from my console application?
 
I want it to look and feel like a windows program, not like a dos program. I'm already somewhat familiar with very basic elements of windows.h, but I can still ...
[13 replies] Last: Firstly, I think there shouldn't be any console with this code if you ... (by jmc)
[SOLVED] String library question
 
As a beginner, self-taught, programming hopeful, I came across this code in the book that I am learning from: #include <string> #include <iostream> us...
[2 replies] Last: Thank you!! It did compile for me. I can't believe I had the cou... (by jbwright84)
Another easy one
 
Ok, I'm trawling through the tutorials, and have got to templates, the syntax of which is a little baffling, although the concept reasonably straightforward. I ...
[11 replies] Last: You are right, the first two (the second one if legal) are pointless. ... (by jsmith)
Best C++ Beginner Book
 
Hello, I'm starting to learn C++, but the tutorials that you can find in the internet only teach you how to use C++ as a calculator, then a book will be very ...
[6 replies] Last: Core C++ A Software Engineering Approach by Victor Shtern has hel... (by wretch)
List.Sort(cmp_fnc) term does not evaluate to a function taking 2 arguments?
 
I am trying to customize my sorting of a LIST using a compare_function, but for some odd reason it keeps giving me the following error: error C2064: term does...
[3 replies] Last: If you want to get fancy, you could make it a static method of B. Stat... (by helios)
Question about nested loops.
 
Our teacher ask us to program a nested loops. And I have solve one of it.Can you help me solve the 2 questions given to our teacher.? display a row of sta...
[4 replies] Last: thanks dude now i know now.... (by omnipotency)
by Nelo87
Find the mode.
 
I'm writing a program that gathers statistical data. It asks for a number of students and the number of movies that each student watched. After that, the prog...
[4 replies] Last: You have to keep a list of every value entered and how many times it w... (by jsmith)
Addresses of array elements as template non-type paramater
 
Hi there! I can't understand why addresses of array elements cannot appear as non-type parameter in class template. I know that something like this: int ...
[2 replies] Last: So... How do you explain something like this: extern Foo foo; //.... (by Quentin)
unknow file type: Result too large
 
hi I have big program (*.exe have 2.5MB). and sudenly I start geting an error. try{ //... }catch(const char* e){ perror(e); } give the message:...
[5 replies] Last: player= new Player(); that throw an error Player::Player():... (by lovelyHanibal)
struct_tm variables seem to be interfering
 
The program below is loosely based on some of the examples in the reference section of this site. It should take in two dates (currently they are defined direct...
[4 replies] Last: helios - Thanks! That worked. Here is the new code for anyone interest... (by computerish)
July 2009 Pages: 1... 89101112... 20
  Archived months: [jun2009] [aug2009]

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