Hi,
I need to time a process within my c++ program, to the finest/lowest level possible (i.e. the smallest fraction of a second possible).
I am running my program on a Sun Solaris UNIX machine, and compiling it with g++. I am unable to get what should(?) be simple code to return a meaningful...
Hi,
I need to be able to create nested data structures in C++, e.g. maps of maps (maps with values being maps). I'm not sure how to do this...
I've tried:
#include <map>
map<string, map* > m;
and other such combinations, to no avail. I know this has to do with the fact that map is a...
Hi,
I've been working on a project in Python, but it has turned out to be too slow to handle the volume of data I need to work with. For my project, I've been using DBM tools (specifically, CDB) and object serialization - essentially creating a DBM file with values consisting of serialized...
Hi,
I'm trying to use dynamic pl/sql in a pro*C application (environment = HPUX Oracle 9i), and am encountering problems when I try to use cursors. Evidently it IS possible to use cursors in this way - after googling I found several examples which provided the foundation for my efforts.
The...
hi,
I have a rudimentary stack-class implemented in C++ which was working fine until I decided to pull the declaration out into a header file. I now have two files - a header file and a definition file (also containing main()).
a snippet of the header is as follows:
template <class T>
class...
Hi,
I have a file of functions I want to object-compile, rather than use to build an executable. I would like to do this so that the .obj file that results can be used in the compilation of other executables. I am compiling my program (using the VC++ 6.0 command-line compile facility, vs. the...
Hi,
I was perusing the Panther book (advanced perl programming), and noticed that, in a particular example, the author does the following:
package Object Template;
require Exporter;
@ObjectTemplate::ISA = qw(Exporter);
@ObjectTemplate::EXPORT = qw(attributes);
My questions are:
1) package...
Hi,
I'm sure there is a simple explanation for this, but it is frustrating me. This code:
#include <string.h>
void main()
{
char* pcFirst = "first";
char* pcSecond = "second";
char* pcConcat = strcat( pcFirst
,pcSecond )...
Hi,
I've build a perl executable, but when I run it I get the following error-message
Can't load module File::Glob, dynamic loading not available in this perl.
(You may need to build a new perl executable which either supports
dynamic loading or has the File::Glob module statically linked...
Hi,
I'm trying to embed the Perl interpreter into a c program on our HP9000 UNIX server. I'm following the examples in "Advanced Perl Programming". Anyway, my command-line is
cc codeGen.c -o codeGen -I "/usr/ccs/bin/ld" -I...
Hi,
I'm doing the following on a HP9000 Unix server...
I have two c source files I need to compile together - one is output from the pro*c precompiler (call it ProC.c), and a non-precompiled c source file (call it Prog.c - no main(), just functions).
When I compile this as follows:
cc -I...
Hi,
I am requesting arrays of free-store memory as follows:
ppvMemoryBlock =
( void** )calloc( iSize
,sizeof( void* ) );
am referencing it (after allocating the
constituent void* values) as follows:
myFunction( *(ppvMemoryBlock + iArrayCounter) );
Both of which work fine...
Hi,
I'm trying to connect to our Oracle9 database via the Perl DBI (I'm using ActiveState Perl, and installed the DBI and DBD::ODBC via the ActiveState ppm).
Here's my basic connection attempt:
use DBI;
$DSN = 'driver={Microsoft ODBC for Oracle};database=MyDatabase';
$DBH = DBI->connect(...
Hi,
I need to use strcat() to concatenate two strings, call them sFirst and sSecond. sFirst is allocated as follows:
char* sFirst = (char*)malloc( sizeof(char) );
sSecond is allocated in the same way. I concatenate them
as:
sFirst = strcat( sFirst, sSecond );
Now, the literature I've...
Hi,
I'd like to automatically launch a Command Prompt window from a script. I've tried to do this and, while there are no errors, a new window does not launch. The command I'm trying to run is
C:\WINNT\system32\cmd
If I type this in at an existing command-prompt, it returns some...
Hi,
I am trying to run a java class in a step in my Ant script,
and it does NOT work when I set the variable in an external parm file but it DOES work when I set the variable internally.
For example, the following works:
<property name="javac.path"...
Hello,
I'm sure this question is quite basic, so please forgive me if it is!
I am writing a function (call it "f()") and some supporting data types (structures, unions etc.) that will be used in various other files. I know I shouldn't put the definition of f() in a header file, as...
Hi,
I'm a little perplexed about the following...
I've seen (and been able to do and work-with) casts along
the lines of
char** ppcVar;
void** ppvVar;
...
ppvVar = ppcVar;
and all is well..
However, if I have function prototypes
void function( char*, char** )...
Hi,
I'm using (trying.. to use) Visual C++ 6.0 to compile
a bison-generated parser (the x.tab.c file). However, the bison program I'm using generates these .c files with code
something along the lines of the following:
#line 1 "C:\my\bison\project\home\bison_project.y"
The...
Hi,
While in the middle of a presentation, IE 5.50 was fired up in order to access a page. The page didn't come up, and when we went to Help to look at the version of IE being used,
Version: 0
Product ID: Unknown
was displayed. We've tried to replicate this issue since, without...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.