Hi,
I have a libX.a that I've created (from test.c) and put in /usr/lib/
I've then created another libY.a, that calls functions in libX.a, I've also copied this lib to /usr/lib/
Now when I...
Type: Posts; User: coletek
Hi,
I have a libX.a that I've created (from test.c) and put in /usr/lib/
I've then created another libY.a, that calls functions in libX.a, I've also copied this lib to /usr/lib/
Now when I...
Ok, that works, but doesn't solve my next problem:
I'm wanting to use cmake to create a static library of my project.
The project (libspam) has the directory structure:
CMakeLists.txt...
Hi,
Say I have a directory structure:
lib/dbg/debug.h
lib/other/other.h
lib/other/other.c
tools/program.c
And other.c has: #include "lib/dbg/debug.h"
Hi,
Why can't I do the following:
#include <stdio.h>
#include <stdlib.h>
class A {
But I have passed it a pointer.
Or do you mean doing?:
char log_filename[100];
double *buf = NULL;
int buf_len;
The routine is in another .c file and the calls to it are in a main() routine set. Except the buf variable is a global variable.
And yes the buf is set to NULL first. Sorry forgot to add that in...
Hi guys,
From what I've tried and read I can't use outb() or inb() to control a parallel port (which connects via usb).
Any body know how to control a parallel port for systems without a...
I wish to increase the size of an array inside a function, since I don't know the size of the array before I call the function.
I would think I could do (for example):
char...
Just thought one of you might be able to give me some advise on coding a good real-time camera logger (i.e. save images with timestamps). FYI I'm using OpenCV to grab frames and save images.
I've...
Solved: As I suspected, it was a serial port config issue. I had the strip
parity bit option set (i.e. options.c_iflag |= (INPCK | ISTRIP)).
Hi,
When I send 0xff over serial, I only recv 0x7f. My write/read type is unsigned char, so I can't see why I'm not recv'ing the MSB. Any ideas?
Thank you.
Which of the following options describe the expected overhead for a class that has 5 virtual functions?
A. Every object of the class holds the address of a link list object that holds the...
Which of the following reasons describe why a destructor cannot throw an exception in C++?
A. The C++ language does not permit it; a throw statement in a destructor will be caught as an error by...
Whats peoples thoughts on newmat vs boost for matrix manipulation.
I've used newmat before and find it very good. I've also heard boost is good but have never used it as yet. Can boost do...
Which of the following statements describe correct methods of handling C++ exceptions?
A. In a hierarchy of exception classes, the order of handling exceptions can be from the most specific...
I've notice g++ is lenient on a few things, any idea why that is?
#include <iostream>
class TestPrint
{
public:
void Print()
{
std::cout << "TestPrint" << std::endl;
}
Which of the following statements provide a valid reason not to use RTTI for distributed (i.e. networked between different platforms) applications in C++?
A. RTTI is too slow.
B. RTTI uses...
Of course, now complies with:
template<typename T>
class MyArray
{
public:
MyArray();
//MyArray(MyArray& copy);
Ok, so after fixing the code to:
template<typename T>
class MyArray
{
public:
MyArray();
//MyArray(MyArray& copy);
Ok, some fix is:
MyData(MyArray<int>& x, MyArray<int>& y);
should be
For the following code template_eg.cc:
template<typename T>
class MyArray
{
public:
MyArray();
MyArray(MyArray& copy);
Just found that out now. Thx peoplez.
I'm use to using malloc instead.
http://ikmnet.com/
Nope :( - was not aware of "placement new" until now.
How can a C++ developer use the placement new syntax to make new allocate an object of class SomeClass at a particular memory address stored in a pointer type variable named pmem?
A. new...