I don't understand the following excerpt from Accelerated C++:
Starting at
Because || is left-associative, and
because of the relative precedence of
||,== ,and -,
r == 0 || r == rows - 1 || c == 0 || c
== cols - 1 means the same as it would if we were to place all of its
subexpressions in parentheses:
((r == 0 |...
Hello, I've got this header (redone from a boost asio example):
#ifndef MSGSRV_H_
#define MSGSRV_H_
#include <asio.hpp>
#include <boost/array.hpp>
#include <boost/bind.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/system/error_code.hpp>
namespace msgSrv {
class msgSrv {
private:
asio::ip::udp::socket *asioSocket;
...
Hi, first post here!
When I need to get the class name inside of one of its methods I just call:
typeid(*this).name()
(then I split the result into tokens and get the class name)
Now I have to define a static member variable and need to get the class name for that.
But I`m not in a method!
So, I cannot use (*this).
Initially, I tho...
Possible Duplicate:
Is Qt worth learning?
I've been considering the pros and cons of putting my hands on Qt...
Still I can't figure out the exact advantages, apart from cross-platform compatibility.
Any help from persons who have been working with Qt and can explain some things is welcome.
...
hello, what C++ functions should i use to output text to the "Output" window in Visual Studio?
i tried printf() but it doesnt show up.
thanks!
...
I want to learn C++ for windows but have no idea where to start; there seem to be so many different technologies that have utterly confused me: Win32, MFC, ATL, STL etc. I know a good deal of C# and Java, no C and a small amount of ANSI C++ (datatypes, loops, classes and OOP), but when I look at other people's code or try to mess around ...
I need a file io library that can give my program a utf-16 (little endian) interface, but can handle files in other encodings, mainly ascii(input only), utf-8, utf-16, utf-32/ucs4 including both little and big endian byte orders.
Having looked around the only library I found was the ICU ustdio.h library.
I did try it however I coudlnt ...
I'm building an isapi filter that will grab any url requests with the prefix "http://localhost/" and redirect that url request to my message page "http://localhost/default.html."
Here's the solution:
if(urlString.Find("/") != -1)
{
urlString.Replace(urlString, "/default.html");
...
How I can delete folder with subfolders (recursive deleting) in C++?
...
I have an InnoSetup for my C# application. And I'd like the setup to check for updates before installing (to make sure the user always gets the latest version). To do this, I need a bit of C++ code to parse an xml file from a remote location (which contains a version string) and have a method return it.
From InnoSetup I can call the DLL...
How I can get actual folder path where my program is without my exe file name in C++?
...
I am not new to programming, I am quite good in C++, Windows SDK , VC++; but I am new to game development .
I want to start this as a hobby in developing a desktop game . I have found several engines, but I am not sure whether it does the initial job I am looking at .
Initially I want to do the following :-
Create a figure (avatar) ...
I have some
std::list<char> list_type
Now I have to supply contents of the list as (char *data, int length). Is there convenient way to present list contents as pointer and length? Does <vector> has such interface?
Thank you in advance.
...
How to add two numbers without using ++ or + or any other arithmetic operator. It was a question asked a long time ago in some campus-interview. Anyways today someone asked a question regarding some bit-manipulations, and in answers a beautiful quide *stanford Bit Twiddling * was referred. I spend some time studying it, and thought that ...
How would I create a new desktop in C++?
I know the CreateDesktop() API but it does not load memus or explorer.exe for the matter.
If not to much trouble would love an example to make a desktop with menus.
...
Working with stl:list and stl::vector types under interrupt handlers I want to avoid malloc() calls.
The question: What is a best way to prevent malloc() calls in STL list and vector? Is it enough to create structure with predefined size and then avoid push/pop/erase calls?
Thank you in advance
...
Hello,
How i can install the CDT plug-in (that you can develop in C++ under Eclipse) in my Eclipse Ganymede, remember that I use Windows Vista. Thanks!
...
I need to render some formatted text (colours, different font sizes, underlines, bold, etc) however I'm not sure how to go about doing it. D3DXFont only allows text of a single font/size/weight/colour/etc to be rendered at once, and I cant see a practical way to "combine" multiple calls to ID3DXFont::DrawText to do such things...
I look...
I'm building a special-purpose embedded Python interpreter and want to avoid having dependencies on dynamic libraries so I want to compile the interpreter with static libs instead (eg libc.a not libc.so).
I would also like to statically link all dynamic libraries that are part of the Python standard library as well. I know this can be ...
Hi All,
I have a question that bothers me for a long time.
I have a mathematical library, implemented as DLL.
The library implements many types of mathematical functions.
The mathematical functions are implemented in different classes based on their functionality. For example, all functions that implements polynomial equations are unde...