Hi All,
I have to frequently compile small program and run it. Since, it was tedious to write compile command g++ -W -Wall file.cpp -o out everytime for each cpp file, I wrote one small scripts, which does the compiling.
Here is the script that I wrote
#!/bin/bash
g++ -W -Wall $1 -o $1.out
So, if I have to compile file.cpp, I will ...
Hello!
I am trying to use notify a main gtk thread ( from a separate thread) that some even occurred using pipes. I get the following warning when I am trying to setup pipes. What is a good workaround?
when I can this g_io_channel_win32_new_fd, I see this warning, and thus pipe isn't created at all :(
GLib-WARNING **: giowin32.c:1564:...
Hello,
I have a problem linking boost.asio. It uses boost.system and the linker errors start with:
/boost_1_39_0/boost/system/error_code.hpp:205: undefined reference to `boost::system::get_system_category()'
which means I need to link boost.system. I already built boost and I have now several lib files.
boost_system-mgw32-d-1_39.dll...
I'm working on a flexible GUI application that can have ~12 varied layouts. These layouts are all well-defined and won't change. Each layout consists of multiple widgets that interface with a DLL using bit patterns. While the majority of the widgets are the same, the bit patterns used vary depending on the interface type being presented....
I am sorry if it defeats the purpose of this forum, but I see very limited GTK activity here and would like get heavily involved in it. What is the prime forum(s) where GTK is discussed. I use it primarily with c/c++.
...
I started programming in C++. It was my first language, but I have not used it in many years.
What are the new developments in the C++ world? What are the BIG things.
Technologies, books, frameworks, libraries, etc.
Over the last 7-8 years what are the biggest influences on C++ programming?
Perhaps we could do one influence per pos...
So I have this idea and I think it's basically impossible to implement in C++... but I want to ask. I read through chapter 15 of Stroustrup and didn't get my answer, and I don't think the billion other questions about inheritance diamonds answer this one, so I'm asking here.
The question is, what happens when you inherit from two base c...
I have C++ project that are built using Boost.Build. The project consists of 3 subprojects.
. [root]
\-- source
\-- common
\-- config
\-- config.cpp
\-- project_1
\-- Jamfile.jam
\-- project_2
\-- Jamfile.jam
\-- project_3
\-- Jamfil...
I have code that controls a mutex lock/unlock based on scope:
void PerformLogin()
{
ScopeLock < Lock > LoginLock( &m_LoginLock );
doLoginCommand();
ScopeLock < SharedMemoryBase > MemoryLock( &m_SharedMemory );
doStoreLogin();
...
}
Can I guarantee that MemoryLock will be destructed before LoginLock?
...
Hi,
I am a final year Computer Science and Engineering student.As part of the final year project i was planning to implement a graph algorithms library(using parallelization) for c++ but came to know that they have already been implemented.
I would be very grateful if you people could suggest me some other project ideas related to my...
Somehow this is the first time I've ever encountered this problem in many years of programming, and I'm not sure what the options are for handling it.
I am in the process of porting an application to Linux, and there is a header file in one of the directories that apparently has the same name as a header file in the standard C library, ...
I have a large 95% C, 5% C++ Win32 code base that I am trying to grok.
What modern tools are available for generating call-graph diagrams for C or C++ projects?
...
I don't know why I'm having a hard time with this. All I want to do is this:
class foo {
public:
foo(){}
~foo(){}
float a,b;
};
class foo2 {
public:
foo2(){}
foo2(const foo &f){*this = f;}
~foo2(){}
void operator=(const foo& f){
x = f.a;
y = f.b;
}
float x,y;
};
/* Usage(...
Below is my func. I call it with
if(try_strtol(v, rhs))
and RHS = "15\t// comment"
bool try_strtol(int64_t &v, const string& s)
{
try
{
std::stringstream ss(s);
if ((ss >> v).fail() || !(ss >> std::ws).eof())
throw std::bad_cast();
return true;
}
catch(...)
{
return false;
}
}
It returns false, i except true with v...
I wrote the following C++ program
class MyClass {
public:
int i;
int j;
MyClass() {};
};
int main(void)
{
MyClass inst;
inst.i = 1;
inst.j = 2;
}
and I compiled.
# g++ program.cpp
# ls -l a.out
-rwxr-xr-x 1 root wheel 4837 Aug 7 20:50 a.out
Then, I #included the header file ios...
I have a C++ source file and a Python source file. I'd like the C++ source file to be able to use the contents of the Python source file as a big string literal. I could do something like this:
char* python_code = "
#include "script.py"
"
But that won't work because there need to be \'s at the end of each line. I could manually copy a...
How can an application write text to the screen without using any DrawText type methods, and how can I catch it?
I've hooked the following:
DrawText
DrawTextA
DrawTextW
DrawTextEx
DrawTextExA
DrawTextExW
TextOut
TextOutA
TextOutW
ExtTextOut
ExtTextOutA
ExtTextOutW
PolyTextOut
PolyTextOutA
PolyTextOutW
None of them yields a thing.
...
I'm using a XMLHTTPRequest object in my C++ project. I have things working fine with normal http requests and https requests on servers with valid certificates. When I attempt to make an https:// request to a server who's certificate would produce an IE "There is a problem with this website's security certificate." error if I tried to br...
Beyond explanation of GAsyncQueue I cannot find anything on how to use this data structure, examples, patterns. I am trying to use to as a IPC mechanism between thread and the main process.
Can someone demonstrate it?
Thanks
...
Hello all
im working on smtp secure connection with smtp
i found that i can manually open secure connection with openssl
but how i can translate this client operation to inline c++ code
...