I know this is a darn simple question, but I'm very used to using Borland and wrappers, so this is a bit of a new approach for me. Can someone simply tell me how I Can open an OpenDialog that only gets .obj files from a visual studio c++ console app?
It's very much appreciated!
...
Without:
MFC
ATL
Using pure C++, WSAGetLastError() returns 10014 - Bad address
What I'm I missing/doing wrong?
Code illustration:
sockaddr_in sin;
SOCKET server;
if ((server = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) == SOCKET_ERROR)
{
cerr << "Error: socket() return value == SOCKET_ERROR" << endl;
WSACleanup();
exit (EXI...
How can I get and set the 'read-only' property of an edit box?
...
We recently had a new requirement to use the phonon component of Qt, which on windows requires Visual Studio.
I installed VS2008 and ran a compile. There are a stack of problems due to make not working anything like nmake.
Since I need to maintain cross-platform I want to test which compiler is being used so that I can make changes as...
Sorry in advance, I'm struggling a bit with how to explain this... :)
Essentially, I've got a typical windows coordinate system (the Top, Left is 0,0). If anybody's familiar with the haversine query, like in SQL, it can get all points in a radius based on latitude and longitude coordinates.
I need something much simpler, but my math s...
Note:
No MFC
No ATL
Using Visual C++
While attempting a connection between the connection point and the caller's sink, an E_NOTIMPL (0x80004001) was returned.
Illustrated below:
hresult = pConnection->Advise(
pSinkUnk,
&dwAdvise);
Question:
How did this occur?
Regards
...
How would you explain "symbols" in a way that a novice programmer like myself would understand?
What are they? Are they some sort of mapping to functions?
I would like to learn more advanced debugging techniques and this term has been a roadblock for me.
...
Hellos. Am having a problem with linking my implementation file in Microsoft Visual C++, and getting this error:
Compiling...
Skipping... (no relevant changes detected)
slList.cpp
Linking...
LINK : fatal error LNK1104: cannot open file ".\Debug\slList.obj"
Error executing link.exe.
Can somebody please assist?
...
Hello.
I am having trouble getting my project to link to the Boost (version 1.37.0) Filesystem lib file in Microsoft Visual C++ 2008 Express Edition. The Filesystem library is not a header-only library. I have been following the Getting Started on Windows guide posted on the official boost web page. Here are the steps I have taken:
...
In MSVC I have this in a header:
#define STR(x) #x
#define STR2(x) STR(x)
#define NOTE(text) message (__FILE__ "(" STR2(__LINE__) ") : -NOTE- " #text)
#define noteMacro(text) message (__FILE__ "(" STR2(__LINE__) ") : " STR2(text))
and I do
#pragma NOTE(my warning here)
GCC has:
#warning(my warning here)
How...
Recently I have discovered that my release executable (made with msvc++ express 2008) becomes very large. As I examine the executable with a hex viewer I saw that only the first 300k bytes contains useful data the remaining bytes are only zeros - 6 megs of zero bytes.
The debug built exe has 1MB size, but the release is 6.5MB.
Why doe...
I have installed Visual C++ 2008 Express Edition on Vista Home Premium and whenever i try to create a new project, no mater which type(CLR, Console, Win32, Empty project) i get "Creating project 'project name' ... project creation failed." However i can open an existing solution.
So basically my Visual C++ is useless.
Any idea what c...
I have a list of about a hundreds unique strings in C++, I need to check if a value exists in this list, but preferrably lightning fast.
I am currenly using a hash_set with std::strings (since I could not get it to work with const char*) like so:
stdext::hash_set<const std::string> _items;
_items.insert("LONG_NAME_A_WITH_SOMETHING");
_...
How can I get the value (string) of the current selection in a combobox?
(Not the integer index)
...
What is the equivalent of following POSIX timed Reader/Writer locks in windows(MSVC)?
pthread_rwlock_timedrdlock()
pthread_rwlock_timedwrlock()
...
Hello everyone,
I'm trying to do something simple here. When I execute the following code in Visual Studio 2008 using the unicode character set, xmlString is correct.
Unfortunately I need to convert the CString to a unsigned char*.
Using the code below, ucStr becomes "<" (i.e. the first character of xmlString).
How should I convert th...
Referring to http://stackoverflow.com/questions/303562/c-format-macro-inline-ostringstream
The question there was for a macro that allows inline concatenation of objects to create a string, iostream-style.
The answer was:
#define SSTR( x ) dynamic_cast< std::ostringstream & >( \
( std::ostringstream().seekp( 0, std::ios_base::...
I want to use the TRACE() macro to get output in the debug window in VS2005 in a non mfc c++ project.
But I don't know which additional header or lib is needed.
I want to know are there any ways of putting messages in the debug output window and how can i do that, thx a lot
...
How do I get past this variable initialization problem? If I only could figure out how to only initialize them only once...
* Main.cpp : main project file.
/************************** Begin Header **************************/
#include "stdafx.h" //Required by Visual C ++
#include <string> //Required to use strings
#include <iostr...
I have some Visual C++ code that receives a pointer to a buffer with data that needs to be processed by my code and the length of that buffer. Due to a bug outside my control, sometimes this pointer comes into my code uninitialized or otherwise unsuitable for reading (i.e. it causes a crash when I try to access the data in the buffer.)
...