I am running Windows 7 64bit, with Visual Studio 2008. I installed the CUDA driver's and SDK. The SDK comes with quite a few examples including compiled executable and source code. The compiled executable's run wonderfully. When I open the vc90 solution's and go to build in Win32 configuration I get this error:
Error 1 fatal error...
Hi,
I am trying to write a function that reads in individual lines from a txt file and stores them in a string array. The function works correctly except for when it reads in blank lines. Example:
Function
ifstream flinput( "somefile.txt" )
string line;
while( getline(flinput, line) ) {
//Add line to array
So the problem is if th...
hi!
how do datamembers get aligned / ordered if inheritance / multiple inheritance is used? Is this compilerspecific?
is there a way to specify in a derived class how the members (including the members from the baseclass) shall be ordered / aligned?
Thanks!
...
I'm now developing a home project, but before I start, I need to know how can I printcout the content of a file(*.bin as example) in hexadecimal?
I like to learn, then a good tutorial is very nice too ;-)
Remember that I need to develop this, without using external applications, because this home project is to learn more about hexadeci...
Hi I have a problem compiling my Qt app with Visual studio 2008 SP1.
For the sake of purity I created a windows XP virtual machine, installed VS 2008, then SP1 and then compiled Qt 4.6. Now from looking at the manifest of the Qt DLLs (using XN Resource Editor) I can see that they depends on 9.0.21022.8 CRT.
But at the same time the lat...
[To any mod considering deleting this question - please don't. Either my or Steve Jessop's code may well be helpful to reference from questions regarding reading text files using C.]
This question has generated the usual amount of sound and fury re the relative merits of C and C++. But something that never seems to get introduced into t...
All over boost.org and also at other sites on the web I've seen code of this form:
class whatever
{
...
private:
std::vector<std::string> m_name; // exposition only
};
What is the meaning of "exposition only"? What is the comment's purpose? What is it trying to tell me?
...
I'd like to include some debug information in an application, but hide certain symbols from appearing. Is there any way to do this with GCC 4.0 (or 4.2)? This is on OSX.
...
I'm trying to write some small tests for a fairly small part of a fairly large project. Attempting to link this beast is unfortunately fairly impossible without linking the entire project together, which I don't want to do (it's a pretty complex system for finding all the dependencies and stuff, and I perfer not to meddle with it).
Now,...
Hello,
Does anyone have any ideas of how I can programatically determine if the excel print preview window is open using c++? I've used spy to look at it, can't find anything sensible.
thanks,
H
...
Is there a way catch an exception like access violation and get information about on which line an exception occurred? This would be very good for debugging purposes, especially for testers..
My environment is Windows with VC++ on VS2008
...
I'm maintaining a plugin (implemented as a dll) for a big closed source application. This has been working fine for years. However, with the latest update to it's SDK the vendor overloaded global operators new and delete. This causes lots of trouble for me. What happens is that my plugin allocates a string. I pass this string into a stat...
I would like to create a custom XUL element named 'video' for a video editing application based on XULRunner. In the XPCOM documentation it is explained how to access your component from Javascript, but I can't seem to find any documentation on how to declare a new XUL element. Where can I find this? Can anyone point me in the right dire...
Hi, I'm facing an issue with c++ on vs2005 and also vs2008...
here's how you can reproduce the issue....
create a new (c++) project called 'test' (file|new|project)
select "Windows Forms Application"
and add the 'stdio.h' include and the code fragment below into the test.cpp source file.....
-------------------start of snippet-------...
In C#, I like the var keyword for situations like this:
var myList = new List<MyType>();
Is there any equivalent in C++/CLI, or do I have to repeat the type name everytime just like this:
List<MyType ^>^ myList = gcnew List<MyType ^>();
Could not find an explicit statement in the docs or by Google so far. I am using Visual Studio 2...
I'm porting a windows network application to linux and faced a timeout problem with select call on linux. The following function blocks for the entire timeout value and returns while I checked with a packet sniffer that client has already sent the data.
int recvTimeOutTCP( SOCKET socket, long sec, long usec )
{
struct timeval timeout;...
I need to be able to suspend and resume the main thread in a Windows C++ app. I have used
handle = GetCurrentThread();
SuspendThread(handle);
and then where is should be resumed
ResumeThread(handle);
while suspending it works, resuming it does not. I have other threads that are suspended and resumed with no problems, is there somet...
I am using the dlmalloc library on Mac OS X in a mixed C/C++ environment.
The following simple code
/// strdup-test.cpp
///
#include <iostream>
#include <string>
int main(int argc, char **argv) {
std::string s1("foo");
char *c1=strdup(s1.c_str());
std::cerr << c1 << std::endl;
// segfault?
free(c1);
return 0;
}
wh...
Is it possible to determine the size of a C++ class at compile-time?
I seem to remember a template meta-programming method, but I could be mistaken...
sorry for not being clearer - I want the size to be printed in the build output window
...
Does a system call or library exist that would allow my C++ code to use hdiutil on Mac OS X. My code needs to mount an available .dmg file and then manipulate what's inside.
...