I have the following class:
class PluginManager
{
public:
Handle<Value> Register(const Arguments& args);
Handle<ObjectTemplate> GetObjectTemplate();
};
I want the Register method to be accessible from JavaScript. I add it to the global object like this:
PluginManager pluginManagerInstance;
global->Set(String::New("register...
I'm trying to compile cairo together with pango to enable advanced font rendering in my application. I got it to work, but I cannot use unicode characters (i.e. I tested with Chinese character).
When I run my application I get this message:
(process:42776): Pango-WARNING **: Failed to load Pango module '/Users/pollux/Downloads/cairo_p...
Hi!
very basic question. i try to write a program that outputs the filenames of the files dragged onto the exe.
i followed this guide for main arguments:
http://publications.gbdirect.co.uk/c_book/chapter10/arguments_to_main.html
this is my code:
#include "stdafx.h"
#include <iostream>
using namespace std;
int _tmain(int argc, _TCHAR*...
Hi all,
I want to browse the source code of gnu implementation of C++ standard libraries -- header files as well as the implementation.
I have landed myself into:
http://gcc.gnu.org/onlinedocs/libstdc++/libstdc++-html-USERS-4.4/index.html
My first step was to look header file at:
http://gcc.gnu.org/onlinedocs/libstdc++/libstdc++-ht...
How do you deal with them? I have some classes (usually classes that hold stats etc.) with some 20+ variable members, and the initialization lists end up very long, extending beyond the page width if I don't manually wrap around. Do you try and break down such classes or do you deal with this in some other way?
It doesn't look very tid...
I'll be writing a validator for a specific file format (the format itself is unimportant). There's a large set of documents that specify what every section of the format needs to look like, how the different parts relate and so on. Lots and lots of MUST's, SHALL's, SHOULD's, MAY's etc.
The architecture I envision is as follows: load the...
I'm curious, does the anisotropic texture filtering increase the memory usage? And how to calculate it?
...
Hello everyone!
I have an upcoming exam on Programming using C++ and we can take consultation material. I have decided to take a reference as well as some code examples, etc.
Which reference should I take?
Here's what I have available at the college's library:
The C++ standard library : a tutorial and reference
STL tutorial and refe...
I want to overload operator << to serialize an object to a file (append). Which stream should I use? ofstream or fstream? what is the difference?
std::ofstream& operator<<(std::ofstream& ofs, const MyData&);
std::fstream& operator<<(std::fstream& fs, const MyData&)
Thanks
Jack
...
What I want to do is to create a new shared library called libxxx that links against another shared library called libzzz, this shared library has an independent "pkg-config"-like tool, let's say it's called "zzz-config" which gives the cflags needed by the compilation phase when using the libzzz.
What I want to do is:
Create configure...
Hi guys
i m trying to make small test driven example by using cppunit. So i have 2 project which are test and normal library project. Whatever i do, i cannot be successfull. i got alltime LNK Error. Any help will be apreciated.
...
Hi,
What does the line:
template<typename _Tp1, typename _Seq1>
friend bool
operator==(const stack<_Tp1, _Seq1>&, const stack<_Tp1, _Seq1>&);
in http://gcc.gnu.org/onlinedocs/libstdc++/libstdc++-html-USERS-4.4/a01367.html
do?
Why is _Tp1 repeated twice in arguements list?
Thanks,
...
Have written the following code:
m_selectCategoryTableWidget = new QTableWidget;
m_selectCategoryTableWidget->setRowCount(0);
m_selectCategoryTableWidget->setColumnCount(2);
m_selectCategoryTableWidget->setHorizontalHeaderLabels(QStringList()<<tr("Category")<<tr("Number of items"));
m_selectCategoryTableWidget->verticalHeader()->setVis...
Hi. For example i create socket using winsock under account named Admin. Is there any possibility to detect which user created that socket? I would like to write in my program: This socket was created by "Admin". i am using c++
...
I am wanting to write to a texture from my directX 11 compute shader. However I have no idea how to display this onto the screen nor am I sure what sort of buffer I should be using to do this.
...
I have some template classes I've written that are dependencies for several other classes I need to compile. I have a few options as to how I can do this in my Makefile:
Each class that requires a template lists its template requirements. This has the drawback of needing to recreate the dependency tree every time I want to add a new c...
Hello,
I am currently writing a plugin for a third party application.
As the plugin framework does not provide any way to access the UI I am now trying to do this manually via the WinAPI.
More specifically, I want to add a custom menu item for my plugin in the "File" menu.
My first attempt using FindWindow to retrieve the handle of t...
I have to create a COM API which basically will read some data from XML , do some processing on it and return some data as a string.
This API will be in COM DLL which will be in memory most of times.
I have created a struct to hold the data in memory which can be used as cache so as to avoid reading file every time whenever API is call...
Ho can i get user account name, that ran the process with specified id. Is there any api function for this?
I am using windows,c++.
...
I'm getting
*** glibc detected *** (/my/program/...): malloc(): memory corruption: 0xf28000fa ***
I've run under valgrind, which reports cases of reading memory that has been freed, but no cases of illegal memory writes.
Could reading freed memory cause memory corruption? If not, any suggestions where else to look beyond the valgri...