I'm using Visual Studio 2008 and I have been wondering why doesn't the autocompletion of Visual Studio kicks in automatically every time I start typing something in C++, unlike C#.
It does show me the list member box when I use the "." or "->" operator but not when I start typing randomly. I can make it appear using alt + right arrow bu...
Is it possible to use a library compiled by visual studio in an application compiled by g++ (mingw) on Windows?
...
Hello All,
Back a long time ago I used to use pre-compiled headers: a. to speed compilation and b. because I supported multiple development tools like CodeWarrior, MPW, VS, ProjectBuilder, gcc, intel compilers, etc, etc.
Now I have a Mac Pro with 32gb of RAM.
Now I use just CMake.
So do we really need pre-compiled headers anymore?
...
My application is a commercial GIS C++ application, and I'm looking for a robust/easy to use connector for Postgresq. (Side note: I also plan to use PostGIS)
Does anyone have any recommendations based on your experience? A plus would be if you have tried out various ones.
I have looked at:
Postgres's C client
pqxx
QSql
EDIT
Also, d...
I have a vector of booleans. I need to set its elements from n-th to m-th to true. Is there an elegant way to do this without using a loop?
Edit: Tanks to all those who pointed out the problems with using vector<bool>. However, I was looking for a more general solution, like the one given by jalf.
...
I'm confused by these two warnings. Can anyone explain how I might have come about triggering them, and how they would be able to be debugged in gdb?
(gtkworkbook:24668): GLib-GObject-CRITICAL **: g_cclosure_new: assertion `callback_func != NULL' failed
(gtkworkbook:24668): GLib-GObject-CRITICAL **: g_signal_connect_closure_by_id: ass...
Hello,
i have a problem reading and using the content from unicode files .
i am working on a unicode release build, and i am trying to read the content from an unicode file but the data has strange characters and i can't seem to find a way to convert data to ASCII .
im using fgets, tried fgetws,WideCharToMultiByte and alot of function...
Is there a basic function call in MFC that simply plays the input error ping?
I am looking for something analogous to the AfxMessageBox() call that simply plays the ping that is frequently heard when an error is made.
...
Why isn't there a designer for native api forms in Visual Studio? Similar to Delphi?
If there exist some programs, tools etc, please advice.
What is the best approach to design complex windows in pure API?
...
I have a linux (Fedora) program that detects the insertion of a USB stick and does an automatic backup via a call to
system("rsync...
Once the system call returns I prompt the user to remove the USB stick. The problem is that the system call returns before rsync has finished copying all of the files to the USB stick. Once the files a...
Hello,
I'm having a problem with storing amazing amounts of text in a rich TextBox.
I'm trying to read a text file fairly big( anywhere from 90mb to 450mb), and put what I've read in a rich textbox. It works in a simple program, but when I do in a complicated program I get an OutOfMemory exception.
One thing to note is that when I e...
I cannot understand why this piece of code does not compile:
namespace A {
class F {}; // line 2
class H : public F {};
}
namespace B {
void F(A::H x); // line 7
void G(A::H x) {
F(x); // line 9
}
}
I am using gcc 4.3.3, and the error is:
s3.cpp: I...
Hello all,
I am making a very simple platform independent(at least that's the plan) console app. I changed from conio.h to pdCurses to make it happen. The problem with that is that in Windows, using Codeblocks and gcc I have a problem.
When I include I get tons of errors. They all concern 3 macros all located in different source files...
I'm trying to optimize the following code below to avoid having to copy and paste and just use SlaveForce and SlavePos properly, which are float[6] type, and baseForce and basePos are vector type:
typedef struct _NodeCoord
{
float coords[6];
} NodeCoord;
int main()
{
...
memcpy(tempNodeCoord.coords, SlaveForce, 6*sizeof(flo...
I'm trying to optimize the following. The code bellow does this :
If a = 0.775 and I need precision 2 dp then a => 0.78
Basically, if the last digit is 5, it rounds upwards the next digit, otherwise it doesn't.
My problem was that 0.45 doesnt round to 0.5 with 1 decimalpoint, as the value is saved as 0.44999999343.... and setprecisi...
Hello, all :)
I've got a scenario like the following:
class criterion
{
// stuff about criteria...
};
namespace hex {
class criterion : public criterion //does not compile
{ //This should inherit from the
//A hex specific criterion //criterion class in the global namespace
...
I'm working on a project that performs physiological simulations using mathematical models. We currently use models defined in MML, JSim's Mathematical Modeling Language, since JSim widely used by researchers. Basically, a model contains variables (with a formula, initial value, and optional units) and constant parameters (with a value a...
I've been playing around with GEdit's syntax highlighting. I love the way that Visual Studio highlight's user created types. I would like to do this for my user created types in C/C++ (eg. typedef's/classes). For example (in C):
typedef struct Node *pNode;
And an example in C++:
class BigNumber
{
// Class stuff here.
};
See t...
I want to get a proper IDispatch pointer then cast it to CMyDispatch pointer and have my way with it later.
i.e. in javascript I want to do something like this:
var x = external.obj.x;
var y = external.obj.y;
external.obj.x = y;
where x and y are instances of CMyDispatch.
CMyDispatch is returned to javascript this way:
STDMETHODIMP...
Hello everyone,
I'm a fairly new programmer so please bear with me on this. I am using VC++ 2008.
I am getting this error from my program:
Unhandled exception at 0x68bce2ba (msvcp90d.dll) in z projection.exe: 0xC0000005: Access violation writing location 0x00630067.
The computer then brings me to this page of code which looks rather...