General C++ Programming - July 2009 (Page 11)

Anyone intereseted in C++ Game Developing using DirectX?
 
If yes, we can try making a few simple games, like a 3D Chess game, or things like that. I know a few things about using DirectX. If someone wants to work at ma...
[no replies]
problem in overloaded functions.
 
can anyone assist me regarding the following program. #include <iostream> inline int calculate(int x, int y) { return x*y; } inline float calculate( flo...
[4 replies] Last: Yes. 12.5 is double ,so if calculate(int x, int y) be called, 12.5... (by song)
STL and Smart Pointers
 
I am pulling my hair out trying to get smart_ptrs to work with STL. I'm tempted to use: class MyClass { vector<OtherClass*> m_ptrs; void addN...
[4 replies] Last: I only once tried to use part of the pool library for other things but... (by jsmith)
by ak555
variable type
 
Is there a type of variable that retains its value even after the program is closed and opened again except register variables
[3 replies] Last: You can store the value to a ini file or XML file. (by song)
manipulate map items, L-value Error
 
Hey Ho... Its my first time using the map-container... and somehow i am not able to change the value of the mapped structureO_o... i got: struct MYSTR...
[2 replies] Last: struct MYSTRUCKT { string name; }; int main(){ int number=1; ... (by song)
by GPN
How to get the exception line from the call point.
 
The below code throws error in the line number 32 where the function is defined. But How to find the line where the function is called. That is I want to th...
[1 reply] : There isn't really a way without macros. (by jsmith)
by julian
Catching HTML with a C++ program
 
My problem is: Every day I have write down the wheather prediction for my region, Extremadura, from the same website, every day, and this is boring because I n...
[3 replies] Last: There are plenty of methods like URLDownloadToFile() (see Win32 ng ht... (by george135)
C++/SQL API Recommendation
 
Can anyone recommend an API to connect a C++ App to a SQL Server? I'm not quite sure on how to get the two communicating. I know C++ and SQL... just don't kno...
[3 replies] Last: Windows Data Access Components SDK http://msdn.microsoft.com/en-us/... (by closed account z05DSL3A)
Calling a vb.net program from C++
 
I have a vb.net program that I created. I would like to be able to call the functions from that program (vb.net) inside of C++. How can I do that?
[4 replies] Last: There is also COM/.net interoperability (if you know about COM (Compon... (by closed account z05DSL3A)
Converting enum types
 
Suppose I have: class MyClass { public: enum eNSEW { kN, kS, kE, kW }; static int ToInt( eNSEW nsew ) { ... } static string ToStr( eNSEW...
[2 replies] Last: That's unfortunate that I have to upgrade to a class to get at operato... (by kfmfe04)
Security code not working
 
I tried to create a code that would ask a used for a authorization code and then their usename in a Windows Concole Application. I came up with the following co...
[3 replies] Last: ewan (by palavzkie)
by Force
Book about C++ and game programing
 
Hi to all!I started learning C++ 2 days ago and I would like to have a book about C++ basics and game programing of my own.Can someone who has experience with s...
[4 replies] Last: Thanks Return!Be sure I'll check that book!I still accept any other su... (by Force)
printing grade
 
This program works EXCEPT for the fact that I can't get it to dipslay the grades in accordance with the scores. This is the section I think I need to work wi...
[4 replies] Last: scores is an unitialized array within the printGrade function. printT... (by kempofighter)
STL bitset count() implementation
 
I am wondering how the STL bitset<N> function count() is implemented, that is, how are the number of set bits counted. For example, there is a simple approac...
[2 replies] Last: SGI's reference implementation runs in linear time with respect to the... (by jsmith)
by romasi
Returning refernce to a pointer
 
Hello, I'm trying to return a dynamically created char pointer to be used by an overloaded operator<< function as such: char *string = new char ; string =...
[7 replies] Last: Thanks for the clarification. =) For n4nature, I meant any function... (by romasi)
Friend function can“t access Member function
 
Hey... I got the following parts of code: MyBase-Class in MyBase.h: int CheckError(); //Ensure ClientThread() has access to CheckError friend unsigne...
[1 reply] : If CheckError isn't a static member of the class, you need a class... (by Bazzy)
String Parsing using known delimiters? [C++]
 
The age old issue of string parsing comes up again ... I have a text file that contains lines that are SUPPOSED to follow a set format, specifically: string,...
[3 replies] Last: For this I would use a regular expression (boost::regex). It will do ... (by jsmith)
by vRltwE
Read a binary file that was made by Matlab
 
Hi, I am working in a C++ code, #include <iostream> #include <fstream> using namespace std; ifstream::pos_type size; char * memblock; int ma...
[2 replies] Last: ...There are 8 bits (0000 0000) in one byte. Not necessarily. see: ... (by closed account z05DSL3A)
What to avoid when coding for multithreading?
 
I would like to ask some experienced multithreading C++ developers, what types of constructs and design patterns we should avoid if we eventually want to conver...
[6 replies] Last: Helgrind does detect race conditions in multithreaded code. (by helios)
near and far keywords inquiry
 
I noticed 2 keywords from a C code listings that I have seen. These are "near" and "far". They are used as shown in the c code snipets below char far Flas...
[5 replies] Last: They're pointers for different memory models and as such have their ow... (by kbw)
July 2009 Pages: 1... 91011121314
  Archived months: [jun2009] [aug2009]

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