Hi Jerry, I have corrected the above syntax error i am having the same problem. nothings appears on my end can u tell me how u are executing the code. i am executing it by simple running first the server and then client in visual stdio 2005.
...
Hi all,
I want to track a laser light dot(which is on a wall) with a webcam and i am using openCV to do this task. can anybody suggest me a way to do it with C++.
Thank you !
...
Suppose I have a class
class C {
C(int a=10);
};
why if I call
C c;
the contructor C(int =10) is called and if I call
C c();
the default constructor is called? How to avoid this? I want to execute only my constructor, I tried to make the default constructor private, but it doesn't work.
...
I tried to port some code onto Mac OS X.
The program uses the "ttmath" library, a header big-num header library.
This library works fine on both windows and linux, but when I try to compile and run it on a Mac, the following error message always shows up :
"can't find a register in class 'BREG' while reloading 'asm'".
I found some d...
I am creating a splash for a program that I'm making but RegisterClass keeps on failing (2: The system cannot find the file specified.)
My code is this:
WNDCLASS wc = {0};
wc.lpfnWndProc = DefWindowProc;
wc.hInstance = g_hinstance;
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
if (wc.hCursor == NULL)
{
#ifdef DEBUG
log_debug("ShowSplas...
What are the general use cases for the C++ standard library containers?
bitset
deque
list
map
multimap
multiset
priority_queue
queue
set
stack
vector
For example, a map is generally better for a paired search.
...
Hi
Suppose you have to develop a software to access customer database, let's say for example "SQL Server".
Are there good libraries to accelerate this job in order to give to my client a good UI?
For example, I could show a grid where he can select his desired customer for updating and deleting existing customers data, also offer a bl...
how Adobe write PhotoShop cross-platform ?!
I want just know how Adobe make PhotoShop cross-platform?, i know PhotoShop is writed completely in C++, but what about GUI ? Adobe use GUI toolkits ?
...
I am trying to use a back_insert_iterator with remove_copy_if using vectors but I have compile errors.
Do you know why the code below is wrong?
#include <iostream>
#include <string>
#include <algorithm>
#include <cassert>
#include <vector>
#include <iterator>
#include <functional>
struct checkRem : std::unary_function<int,bool> {
...
void add(int register, int& acc)
{
acc += register;
}
main.cpp:124: error: expected primary-expression before ‘register’
wth is wrong right there?
...
What I want to do is read a file called "test.txt", and then have the contents of the file be a type const char *. How would one do this?
...
I'm writing a program that consists of a while loop that reads two doubles and prints them. The program also prints what the larger number is and what the smaller number is.
this is the code i have so far.
int main()
{
// VARIABLE DECLARATIONS
double a;
double b;
while (a,b != '|') ...
GUI apps for Win/Linux/Mac in C/C++
Please, i want know how to write a "pure" "native" "API-level" apps for Windows and Linux and Mac in C++.
I don't want one-code run-anywhere, but a native code for every OS
Solution For Windows
Just use Mingw/Win32 API, its very simple!, very clear, and that way i like programming under Windows!.
...
Why can't a C++ compiler recognize that g() and b are inherited members of Superclass as seen in this code:
template<typename T> struct Superclass {
protected:
int b;
void g() {}
};
template<typename T> struct Subclass : public Superclass<T> {
void f() {
g(); // compiler error: uncategorized
b = 3; // compiler error: unr...
Hi,
I have a QGraphicsItem (actually, a QDeclarativeItem) and I want it to take up the entire visible space of the QGraphicsView (again, its actually the derived QDeclarativeView class) to which it was added. Normally, you can use QDeclarativeView::setResizeMode(QDeclarativeView::SizeRootObjectToView) and QDeclarativeView will automatic...
Hello everyone,
I'm slowly learning to be a better C++ programmer and I'm currently debating the best way to implement a wrapper for a C library. The library is a wrapper around a compressed file format that can store tags of various types (char *, char, double, float, int32_t). The types are stored as uint8_t* and there are a bunch o...
I have a stream of 16 bit values, and I need to adjust the 4 least significant bits of each sample. The new values are different for each short, but repeat every X shorts - essentially tagging each short with an ID.
Are there any bit twiddling tricks to do this faster than just a for-loop?
More details
I'm converting a file from one f...
Basically I'm reading the contents of a file using fstream then converting it to const char* type. I'm supplying this to Lua, and Lua will do something with this. This however does not work. What does work is if I do:
const char* data = "print('Hello world')";
luaL_pushstring(L, data);
luaL_setglobal(L, "z");
They both are in the t...
i want to read a file.. but.. when i debug my program it runs but a pop up appears and says system programming has stopped working and in the console, it`s written that Press enter to close the program. my code is ::
// System Programming.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "iostre...
I have tried so many combination's of code I don't have a sample to show.
I have a Objective C view controller, and in the interface I declare a C++ class that contains the preferences of what the user wants to have. I do my @property command in the header and @synthesize command at the top of the .mm file.
Then I use the class in the...