General C++ Programming - June 2009 (Page 9)

by cao
problem when read a file
 
Hello everybody, I'm a beginner in C. I want to read a file data.txt in C (this file contains 200 lines of integer).Here's a sample structure of file data.tx...
[no replies]
check EOF ???
 
Hi everybody? Does anybody knows how can I check the EOF in c++? I want to read a file written by other application. So I want to check the EOF flag in order...
[1 reply] : eof() should work but if you are checking if the file is open you shou... (by Bazzy)
backtracking algorithm
 
Hi, Need help with some code for a backtracking algorithm to solve sudoku puzzles. Been searching far and wide and all I have come across are a 1000 other ...
[8 replies] Last: It was for a grad position. I can't complain as obviously a better cod... (by johnrambo)
by titch
trig library functions
 
Hi all, I've been writing a program using the cmath.h library functions sin, cos, tan and was wondering why entering increasingly larger angles into these fu...
[6 replies] Last: There's no sign bit. The exponent is excess-n and the mantissa is 2's... (by Hammurabi)
malloc question
 
Hi, This code: #include <stdio.h> #include <stdlib.h> char* xxx(){ char* yyy = malloc(sizeof(char)*1024); return yyy; } int main(int argc, char *ar...
[10 replies] Last: It is good practice to release dynamically allocated memory after you ... (by jsmith)
Random Efficacy Question
 
Which is the better? Or are they both basically equal? std::string myFunc() { std::string myStr; //do stuff it return myStr; } std::string...
[12 replies] Last: I have no clue what you just said helios.... [...] This is what I mea... (by helios)
Reading Files...
 
Hey, I have a general question. I want to write an importer class interface that will be inherited by a class that handles reading and analyzing of a certain fo...
[1 reply] : It depends on the size of the file and what kind of operations you int... (by Return 0)
Problem in returning value from class.
 
Dear all, I am implementing Depth First Search class of BOOST Graph library, Now i am facing general programming related logical error. I want to access b...
[6 replies] Last: EDIT to my previous post: Actually, without looking at the declarat... (by jsmith)
by BrianM
Stopping input
 
This is the code I am working on. We have to create a game known as Malom. As you can see from the code, you input a value into the board, which corresponds t...
[6 replies] Last: thats what i thought (by jloundy)
New to C++ Embedded Systems Programming
 
Hi all, I'm generally not a poster, however, I am being introduced to C++ Embedded Systems Programming (a field I am admittedly relatively ignorant to--the embe...
[3 replies] Last: And here is the code... I do recommend to try this on your own though.... (by datta016)
Manipulating Excel with C++
 
I am attempting to export a 10 x 150 array into excel. I am currently using a createprocess() command to call up a csv file that I've created. The problem, i...
[5 replies] Last: Hello, "I am attempting to export a 10 x 150 array into excel" with... (by EverBeginner)
by Calwoz
Checkpoint problem
 
Me and a friend are writing our first text based game in C++, and we've recently started to code the save/load functions which work as we want them too. The ...
[7 replies] Last: I guess I'm still not understanding. I see a theif: label so you must... (by Return 0)
by allynm
printing function addresses
 
Hello everyone; I've spent a frustrating afternoon trying to figure out how to do something that should be trivial. Namely, printing out the address of a fu...
[4 replies] Last: You would have to look at the member functions provided by the I/O str... (by jsmith)
struct in class c++
 
Hi! this is my problem: I have a class where I have define a struct.at most I can have 32 of this struct: class E{ int cont; struct X { int l; int ...
[3 replies] Last: It would really help if you formatted your code using the code tag. ... (by kbw)
Creating a thread from an Member Function?
 
Hey I want to create a thread by using an member function as the threads function? But somehow im too dumb... is this even possible with class member functions...
[14 replies] Last: na, i meant the func()-Function the ThreadFunctions calls... (by Incubbus)
Implements If statement in different way - more optimized way
 
Hi, Once I was in Interview, Intel , and one of the interviewers asked me , if you have if statement , how can you implement that in more optimized way (Do ...
[6 replies] Last: Thank you all :-) (by waelali)
How C++ invokes virtual functions
 
Greetings, everyone. This is my first post in the forum and I hope this is the right place for my question. My curiosity drives me to think what would happe...
[6 replies] Last: Ah-ha, Compiler optimization. Thanks all for your answers and I learn... (by chenkai036)
by myself
Source Code for a Game FRIEND?
 
i had this really cool game in which you type in questions and get back witty replies. is it possible to create this program in c++? if anyone already has this ...
[1 reply] : Get the question ( http://www.cplusplus.com/reference/string/getline/ ... (by Bazzy)
by Deimos
A C++/SDL RPG?
 
Hello everyone, Here I am before you, one more time, asking for wisdom. I want to design an RPG, from scratch, using C++ and SDL. I started out by creating ...
[8 replies] Last: there is a c++ object oriented library for graphics sound and stuff al... (by csiz)
duplicated member in template Set?
 
Associative containter-Set is new to me and was used in my program, and I found there ARE duplicated members in the Set. I suspected this could be related to th...
[10 replies] Last: Hmm, I tried this approach, however it has the same complain that the... (by yixiuge)
June 2009 Pages: 1... 7891011... 13
  Archived months: [may2009] [jul2009]

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