I am trying to calculate the centre of mass (x,y,z) coordinates of an object defined in an STL file (stereo lithography, not to be confused with the standard template library). The STL file contains a closed object (or objects) defined by a boundary made of triangles. The triangles themselves are not necessarily in any order, the file is...
I have been learning C++ in school to create small command-line programs.
However, I have only built my projects with IDEs, including VS08 and QtCreator.
I understand the process behind building a project: compile source to object code, then link them into an executable that is platform specific (.exe, .app, etc). I also know most proj...
Hi,
I am unable to find any open source libraries to render ODF documents using C++. I found ODKit suporting Java and AODL for .NET C#.
Does any one have any idea or provide me any pointers.
Thanks man,
AiWee
...
The WGL_EXT_swap_control extension allows doing this on Windows, but I am unable to find anything even remotely cross-platform doing the same, i.e. syncing my buffer swaps with screen refresh. My application uses GLEW, so something offered by that would be preferable. Cross-platform support for Linux, Mac and Windows is necessary, but my...
This seems like it should be strait forward, but a lot of the information I'm finding it pre-snow leopard, deals with cocoa and carbon, or the XCode IDE. None of which helps me with my problem at hand.
I simply want to compile, and run openGL using C++ without becoming dependent on the Mac environment since I will most likely need to g...
I am trying to use sgi hash_map.
#include <list>
#include <iostream>
#include <string>
#include <map>
#include <cstring>
#include <tr1/unordered_map>
#include <ext/hash_map>
using namespace std;
struct eqstr
{
bool operator()(const char* s1, const char* s2) const
{
return strcmp(s1, s2) == 0;
}
};
int main()
{
hash_map<...
Prepared a manged c# DLL using assemblies of SMO of version:10.0.0.0 of SQL 2008 and I called the functions in this DLL from an unmanged c++ code. This application is running successfully for SQL Server 2008 but this application is throwing exception when i run for SQL Server 2005 as follows:
Description: Could not load file or assembly...
I have two processes P1 and P2.
I have this large read-only resource, called "R" that I want both P1 and P2 to have access to.
R is not just a "flat" group of bytes; it's a bunch of C++ objects that point to each other.
I would prefer that P1 and P2 only share one copy of R -- somehow have P1 load R into a region in memory (that's mma...
I'm trying to read just the integers from a text file structured like this....
ALS 46000
BZK 39850
CAR 38000
//....
using ifstream.
I've considered 2 options.
1) Regex using Boost
2) Creating a throwaway string ( i.e. I read in a word, don't do anything with it, then read in the score ). However, this is a last resort.
Are there a...
Hello everyone,
sorry if the question is stupid and has been asked thousands of times but I spent a few hours googling it and could not find an answer.
I want to read in text file which can be any of these: ASCII/UTF-8/UTF-16 BE/LE
I assume that if file is unicode then BOM is always present.
Is there any automatic way (STL,Boost or so...
Hi...
I was wondering if there is a way to put objects of a class in a header... for example...
class blabla{
}object;
if i made a object there and then include the header in more than one sorce file, i get an error of multiply defined symbols found. I am new so don't understand fully everything. Also, I want to do something lk...
I recently came across this expression - but reading up on Wikipedia did not clarify it much for me - I still don't get it:
What's the point of it
How is it used in practice (i.e. how does it benefit a coder in their day to day work/building systems)?
[Edit]
The Wikipedia article C++ example is overly long, and conflates the discussi...
I have created a named pipe with following flags:
PIPE_ACCESS_DUPLEX - both side read/write access
PIPE_TYPE_MESSAGE - Message type read
PIPE_WAIT - blocking read\write
From the server side I am calling ConnectNamedPipe and waiting for the clients to connect.
From the client side I am calling CallNamedPipe to connect to server and w...
Hi
I am trying to develop an HTML page (internal of course) that can in some way be able to load another application. I don't mind using any language to do that. I am using a webkit interface to render the HTML page (well, it QTWebKit) and sadly it does not allow using ActiveXObject (JavaScript) to be used to call another app. I am not ...
Hey S.O Guys
I have recently been doing some work that has been quite in depth,
i was wondering what you think is better for logging.
Is it better to.
A. Every time i want to write to my log, open the file, write to it
then close it straight away so it there is no real chance of losing
information in the case of a critical failur...
Ok, Here's some code that outlines what I'm trying to do.
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/fcntl.h>
#include <iostream>
#include <sstream>
int main( int c, char *v[] )
{
int fd = open( "data.out", O_RDONLY | O_NONBLOCK );
std::cout << "fd = " << fd << std::endl;
char buffer[ 1024000 ];
ssize_...
Typically the 'using' declaration is used to bring into scope some member functions of base classes that would otherwise be hidden. From that point of view it is only a mechanism for making accessible information more convenient to use.
However: the 'using' declaration can also be used to change access constraints (not only for functions...
I use pthread_create(&thread1, &attrs, //... , //...); and need if some condition occured need to kill this thread how to kill this ?
...
What is a cross-platform C++ GUI framework that has good skinning ability?
So I could (and give the users) the ability to customise the GUI.
...
Hi,
I'm trying to see if the user has the SeLoadDriver privilege. I've got the PLUID :
PLUID pld;
LookupPrivilegeValue(NULL, SE_LOAD_DRIVER_NAME, pld);
But now i'm not sure how to get a bool from the PLUID stating that the user has, or not, the privilege. I've read the related methods but it think that it might be an easy way...