I have a program to which I'm adding fullscreen post-processing effects. I do not have the source for the program (it's proprietary, although a developer did send me a copy of the debug symbols, .map format). I have the code for the effects written and working, no problems.
My issue now is linking the two.
I've tried two methods so f...
I've been struggling to try and (incrementally) modify example code from the documentation but with not much different I am not getting the behavior I expect. Specifically, the "if" statement fails when (my intent is that) it should be passing (there was an "else" but that part of the parser was removed during debugging). The assignmen...
Hello. My task was to create pseudodatabase in c++. There are 3 tables given, that store name(char*), age(int), and sex (bool). Write a program allowing to :
- add new data to the tables
- show all records
- sort tables with criteria :
- name increasing/decreasing
- age increasing/decreasing
- sex
Using function templa...
I have a class declared along the lines of
template<int a, int b>
class C {
public:
array[a][b];
}
and I want to use it as argument in a function like this:
bool DoSomeTests(C &c1, C &c2);
but when I compile, it tells me 'use of class template requires template argument list.' I tried
template<int a, int b>
bool DoSomeTests(C...
Hey !
I'm building an MFC app in Visual Studio 2008 which classifies textures and I need some sort of lightweight database to hold the characteristics (just some doubles and strings) which can be:
-carried around with the app on different computers;
-be able to perform queries on it from the app (searches , updates ,inserts ,etc);
Cu...
How exactly can I subclass QGraphicsLayoutItem?
I write a class that subclass QGraphicsLayoutItem and reimplement sizeHint and setGeometry but when I add my custom item to linear or grid layout. It does not shown?
What is missing?
Here is my trial.
//basicitem.h
#include <QGraphicsWidget>
#include <QtCore/QRectF>
#include <QtGui/QP...
hey guys:
it's simple i had this linux pc which i connect remote and i have this application that i run there and i want to debug it, but i just don't know how.
It's the simpler c++ app on the world, load some libraries, do some calculus, print some output and return,
It's just that, i just haven't any clue.
So any help would be appre...
Ok, its been a while since I've done any file input or string manipulation but what I'm attempting to do is as follows
while(infile >> word) {
for(int i = 0; i < word.length(); i++) {
if(word[i] == '\n') {
cout << "Found a new line" << endl;
lineNumber++;
}
if(!isalpha(word[i...
Hi everyone. I've been trying to create a SWIG wrapper for this tiny little C++ class for the better part of 3 hours with no success, so I was hoping one of you out there could lend me a small hand. I have the following class:
#include <stdio.h>
class Example {
public:
Example();
~Example();
int test();
};
#include "exam...
Is there a built in linux utility that I can use to test a newly compiled shared library for external undefined references? Gcc seems to be intelligent enough to check for undefined symbols in my own binary, but if the symbol is a reference to another library gcc does not check at link time. Instead I only get the message when I try to...
I have a legacy C library, written in an OO type form. Typical functions are like:
LIB *lib_new();
void lib_free(LIB *lib);
int lib_add_option(LIB *lib, int flags);
void lib_change_name(LIB *lib, char *name);
I'd like to use this library in my C++ program, so I'm thinking a C++ wrapper is required.
The above would all seem to map to s...
The constant 0 is used as the null pointer in C and C++. But as in the question "Pointer to a specific fixed address" there seems to be some possible use of assigning fixed addresses. Is there ever any conceivable need, in any system, for whatever low level task, for accessing the address 0?
If there is, how is that solved with 0 being ...
I have two classes, Car and Person. Car has as one of its members an instance of Person, driver. I want to move a car, while keeping track of its location, and also move the driver inside the car and get its location. However, while this works from inside the class (I have printed out the values as they are calculated), when I try to acc...
From a previous question about vector capacity, Mr. Bailey said:
In current C++ you are guaranteed that no reallocation occurs after a call to reserve until an insertion would take the size beyond the value of the previous call to reserve. Before a call to reserve, or after a call to reserve when the size is between the value of the ...
#include <iostream>
#include <fstream>
#include <cstring>
using namespace std;
typedef unsigned long int WORD; /* Should be 32-bit = 4 bytes */
#define w 32 /* word size in bits */
#define r 12 /* number of rounds */
#define b 16 /* numb...
So, I have this source:
#include <winsock2.h>
#include <windows.h>
#include <iostream>
#pragma comment(lib,"ws2_32.lib")
using namespace std;
int main (){
WSADATA wsaData;
if (WSAStartup(MAKEWORD(2,2), &wsaData) != 0) {
cout << "WSAStartup failed.\n";
system("pause");
return 1;
...
I currently work for a company that uses Kayako for their support system. They sell an extra program called Insta Alert that plays a sound when a new ticket is submitted.
I use WHMCS for my own company, and would like to develop something to work with it that does the same thing. Here is the WHMCS API...
http://wiki.whmcs.com/API:Funct...
Can anyone explain Exception Specifications as used in C++ ?
When are they used (I have rarely seen it used in code)
What are the pros and cons (benefits/disadvantages) of using exception specifications?
...
I'm having some trouble overloading my stream extraction operator in C++ for a hw assignment. I'm not really sure why I am getting these compile errors since I thought I was doing it right... Here is my code:
Complex.h
#ifndef COMPLEX_H
#define COMPLEX_H
class Complex
{
//friend ostream &operator<<(ostream &output, const Complex...
I've written a member function of class Node to read a tree of Nodes in postfix order.
It will be called by the Node instance which is the root node of the tree.
So: N.postfix();
these appear to be illeagal:
*this->left.postfix();
*this->right.postfix();
What is the proper way to do this?
class Node
{
public:
const char *cargo...