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 strongm 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: LaoMa
  • Order by date
  1. LaoMa

    Run Servlet with Tomcat

    Hi guys, I installed tomcat 4,the server works fine (shows up the test page),and the servlet code compiles, but I can't load it with local:8080 That's what I did:create a directory of 'classes' under webapps/Root/WEB-INF/,then put my .class file there,but when I tried...
  2. LaoMa

    Open jar in Linux/Unix

    Sorry a stupid question: If I havent' java installed, is it possible to open .jar in windows or Linux? I just want to open and read the code. Thanks.
  3. LaoMa

    String connection in C++

    Hi,I wonder how to connect 2 strings in c++ under Unix? I tried strcat,and the code got stuck(no compiling error,though). This is what I'm doing: char* s1=&quot;bin&quot;; char* s2=&quot;***&quot;; ... cout<<strcat(s1,s2)<<endl; simply doesn't work! The execution stops at the strcat.
  4. LaoMa

    A shell program in c++

    Hi, I just resolved the problem by getting the command line with getline.(......),and then tokenized it,assigned the values to argv[0],argv[1]...actually no limit needs to be specified.Finally I found out I didn't have to allocate for argv[]. Thanks all!
  5. LaoMa

    A shell program in c++

    Yes.Actually I already tried: struct command_t* command=new command_t; no success,still showing up segmentation fault. The problem is in cin>>command_t->argv[0] (or strcpy),if I assign a constant like command_t->argv[0]=&quot;****&quot;; it doesn't complain. I wonder do I need to allocate...
  6. LaoMa

    A shell program in c++

    Hi,I'm writing a shell in c++ for Unix/Linux,which takes any system command and execute it. It's pretty simple now.In the first step,I just want to type certain command and display it,like this: #include <iostream> using namespace std; struct command_t{ char* name; int argc; char...
  7. LaoMa

    #include in unix/linux

    A basic question of running c++ in unix/linux: How to link the lib files such as #include <iostream>? Thanks.
  8. LaoMa

    Help with queue::pop( )

    Hi,I'm using VC++6.0 #include #include .. template class QueueArray { public: .... T Dequeue(); private: vector > > vecQue; ... }; template T QueueArray::Dequeue() { ... T item; item= vecQue[i].back(); vecQue[i].pop(); return item; } the line of vecQue[i].pop(); doesn't compile and the...
  9. LaoMa

    vector in C++

    Now I need to implement a variable-sized generic QueueArray class that implements an array of queues,and then constructs a QueueArray object intqueue consisting of an array of 10 integer queues using the statement: QueueArray <int> intqueue (10); I tried this: template<class T> class...
  10. LaoMa

    fork() and execve

    I got 2 cod of parent.c and child.c here: parent.c: #include <sys/wait.h> #define NULL 0 int main(void) { if(fork()==0){execve(&quot;child&quot;,NULL,NULL);exit(0);} printf(&quot;Process[%d]:Parent in execution\n&quot;,getpid()); sleep(2); if(wait(NULL)>0)printf(&quot;Process[%d]:Parent...

Part and Inventory Search

Back
Top