Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: DoraC
  • Order by date
  1. DoraC

    process-timing question

    ...to get what should(?) be simple code to return a meaningful answer. example: #include <iostream> #include <time.h> ... int main( int argc, char* argv[] ) { ... time_t t1 = time(0); //-- code to be timed goes here... should take about //-- .001 seconds or so... time_t t2 = time(0)...
  2. DoraC

    nested data structures

    Thank you for your reply, This leads to the following question... is it possible to store in a map values of different map-types?.. (e.g. map<int,int>, map<string, string>, etc.) I think the answer is probably no, but am not sure. Perhaps I've been living in the world of weak-typed scripting...
  3. DoraC

    nested data structures

    ...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 template, but I'm not sure how to work around...
  4. DoraC

    c++ and DBM/object-serialization

    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...
  5. DoraC

    pro*c dynamic pl/sql question

    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...
  6. DoraC

    hideous template woes

    ...if I follow the same procedure but with non-template classes. This is very frustrating - what am I missing or doing wrong? This is a simplified version of something I'm doing for work. We unfortunately have no C++ people here, other than me. ANy help *very* appreciated, Thanks :,( dora c
  7. DoraC

    hideous template woes

    ...if ( dStack.empty() ) { throw ReadEmptyStack(); }; Tdata = dStack.back(); dStack.pop_back(); return Tdata; } ... int main() { mSTACK<int>* csStack = new mSTACK<int>; ... int ia = 0; csStack->push( ia ); cout << &quot;value1 is: .&quot; << csStack->pop()...
  8. DoraC

    object-compile woes

    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...
  9. DoraC

    &quot;require Exporter&quot; question

    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...
  10. DoraC

    strcat() question

    ...the new code: #include <string.h> int main() { char pcFirst[100] = &quot;first&quot;; char pcSecond[100] = &quot;second&quot;; char* pcConcat = strcat( pcFirst ,strcat( &quot; : &quot;, pcSecond ) ); printf(&quot;concatenated: .%s.\n&quot...
  11. DoraC

    strcat() question

    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 = &quot;first&quot;; char* pcSecond = &quot;second&quot;; char* pcConcat = strcat( pcFirst ,pcSecond )...
  12. DoraC

    DynaLoader and dynamic-loading

    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...
  13. DoraC

    embedding perl interpreter question

    Hi, I'm trying to embed the Perl interpreter into a c program on our HP9000 UNIX server. I'm following the examples in &quot;Advanced Perl Programming&quot;. Anyway, my command-line is cc codeGen.c -o codeGen -I &quot;/usr/ccs/bin/ld&quot; -I...
  14. DoraC

    pro*c compile/linkage question

    Thanks for the reply! So, my efforts to -I include those libraries when I was doing my cc compile AFTER I had run the make file to produce the .c file were in error... I should be including that IN the make file. Does anybody have a good, sample makefile that would allow me to produce only...
  15. DoraC

    pro*c compile/linkage question

    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...
  16. DoraC

    free() question

    That's really in my code... they're actually different variables but point to the same address. Sorry about that - I was trying to slice my code down to something postable and understandable and forgot that... dora c
  17. DoraC

    free() question

    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...
  18. DoraC

    DBD::ODBC/DBI connection from Windows to Oracle

    Hello Mactonio, Thanks for the reply. Which Oracle driver are you using - the &quot;DBD::Oracle&quot; driver? I first tried to use an Oracle driver I already had on my PC (the one I reference above), but that didn't work. I went to CPAN, and DBD::Oracle looks promising. However, when I...
  19. DoraC

    DBD::ODBC/DBI connection from Windows to Oracle

    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(...
  20. DoraC

    strcat and memory-allocation

    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...

Part and Inventory Search

Back
Top