General C++ Programming - June 2011 (Page 10)

Friendship and circular dependencies
 
Hello, I would like to know how I could solve the following circular dependency. class_A.h ------------ #include "../include/class_B.h" class class_A { pub...
[18 replies] Last: All I really have to say here is that friend does not break encapsul... (by Abramus)
Loosing pointer values
 
I have a function that I pass a couple of parameters to. This function works as a wrapper to a third party library function. The results of the calculations are...
[3 replies] Last: If you can see the correct values in the copyToReturn array inside t... (by jimc)
by rucafe
binary search vector entries
 
I have created a program that reads data from a file and stores it into a vector. The data looks something like the following: 48.698635 -0.000000 0.000019 1...
[1 reply] : Is using a vector a requirement? You could use a (multi)set and its up... (by m4ster r0shi)
Removing items from boost ptr_list
 
I am using boost::ptr_vector to keep a list of pointers so that when the list is destructed all the pointers get deleted automatically. However, sometimes when ...
[7 replies] Last: That's an interesting point, I hadn't considered the possibility that ... (by beany37)
SDL_Mixer - Undefined Reference
 
I installed SDL_mixer to handle sounds with SDL but when I try to compile my code I get this error: undefined reference to `Mix_OpenAudio'| I also have ...
[no replies]
C++ Internet Connection Hack Problem
 
So, for a while I have been trying to create a hack for Internet Connection, because my place only has one computer connected to an internet source. So I though...
[1 reply] : http://www.aircrack-ng.org/ (by MottMan)
Usage of the ^
 
MSDN frequently employs this syntax: String^ path = "c:\\temp\\MyTest.txt"; My question regards the purpose of this syntax, as it is new to me. Informa...
[3 replies] Last: To get those errors to go away, all you have to do is get rid of this ... (by shacktar)
How do I get the strings from ms office find and replace?
 
I would like to write a program that monitors ms office's find and replace utility, and every time the replace or replace all button is pressed I want the two s...
[4 replies] Last: Including it is like typing it into your code at that point. Obviously... (by LB)
Buffer to char[] ?!?!?
 
Guys, help me, please. I am altering a old program and I have a doubt. Currently, the point of program which I'll alter is doing this: fwrite (buffer...
[2 replies] Last: I believe Albatross is correct in the above assertion. However, the bu... (by aaronfjerstad)
by jorgen
gmp precision
 
When using the gmp library for high precision calculations, is it right that if I use mpf_set_d(...) to assign a double value to an mp float, the precision of o...
[2 replies] Last: Will do, thanks! (by jorgen)
input/output read and array
 
Hi folks, I'm new to the site and have an input/output question. Given a file with the following sample data: 7 12.457826 13.877654 0.123456789 0....
[4 replies] Last: Again, thanks - will take a look at that path... (by Ed Huff)
by aatwo
Simple threads with pthread.h in linux
 
Hey guys :) I have a quick question about pthreads under linux (pthread.h). Note I am 100% new to threads :P Is the following code safe? It seems to work perf...
[1 reply] : Hi aatwo, If you are new to threads and using C++, I highly recommend... (by PanGalactic)
Vector of Vector of Objects
 
What is the best way to move vector of vector of objects? For e.g. template<typename T> class A{ private: vector<vector<T>> m_object; public...
[1 reply] : Your getObject() function does return a full copy the vector of vector... (by webJose)
Arrays!
 
Hi, i have been trying to get my head around arrays. Here: I define a variable char input ; Then take input cin.getline(input,3); An 'add' function then ...
[5 replies] Last: Yeah, conversion was my initial thought, thanks for your help. :) (by jammas615)
Closing Socket Connection!!
 
Hello, I have developed a client server application which use TCP sockets for communication. The client application is a MFC windows form using CSocket and...
[4 replies] Last: Hi again, As I saw that the server now can reconnect with the clien... (by jhatzics)
std::remove question
 
Hi guys, considering the code below : std::vector<SphereMarker>::const_iterator it = markerList.begin(); while(it != markerList.end()){ if(std::find(cur...
[4 replies] Last: So basically if the first element is erased then it points to the next... (by Silvermaul)
by tekn22
Help with this C++ snippet
 
Could anyone tell me why this program is crashing under gcc 4.4.5? Aborts with the following error messge: terminate called after throwing an instance of 'std:...
[7 replies] Last: Doesen't auto_ptr<int> f() throw() mean that f() does not throw at al... (by closed account 1yR4jE8b)
Reversing digits
 
I wrote a program and spent a lot of time to figure out what is wrong with it and have had no luck. It is probably something simple and in my efforts im sure I ...
[5 replies] Last: Do you know how to use your debugger? If so, use it and run through yo... (by Ikaron)
openGL include files
 
Hello everyone, I am currently working through a book on openGL, it's kind of an outdated book so it uses the gluax.h header file. I know there have been thread...
[no replies]
effective C++ warning mingW
 
Hello, I use CodeBlocks/MingW32 on Windows XP. I turned on the "allow effective c++ warnings (thanks Scott Meyers) option in the compiler/linker options menu, ...
[4 replies] Last: if you don't declare a copy constructor or operator= in a class then ... (by tition)
June 2011 Pages: 1... 89101112... 28
  Archived months: [may2011] [jul2011]

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