Forum: Python Jul 26th, 2008 |
| Replies: 2 Views: 255 getopt? how do I extract the arguments using getopt
Usage:
test.py -P abc -S def -G xyz
How do I extract the values abc, def and xyz? |
Forum: C++ May 23rd, 2008 |
| Replies: 5 Views: 242 |
Forum: C++ May 23rd, 2008 |
| Replies: 5 Views: 242 STL map? How do I get the first 5 elements of a map? |
Forum: C++ May 23rd, 2008 |
| Replies: 2 Views: 162 ignore digit How to I read in a text file ignoring the digits, just want the text in the text file
Any sample code? |
Forum: C++ May 22nd, 2008 |
| Replies: 8 Views: 277 |
Forum: C++ May 21st, 2008 |
| Replies: 8 Views: 277 |
Forum: C++ May 20th, 2008 |
| Replies: 8 Views: 277 |
Forum: C++ May 20th, 2008 |
| Replies: 8 Views: 277 Help me debug? The problem is with this line
inCustomerDetails[i].getCustomerProduct(productName, productID, unitCost, quantityPurchased, x);
data.txt
5
Angie Ang S1234567 Y 4
Choco P0001 5.50 2
Rice P0002 10.00... |
Forum: C++ May 15th, 2008 |
| Replies: 0 Views: 103 help needed Just wondering how do you create a queue system using pthread?
I need to create 2 thread, one for putting in the queue number into an array and the other for removing the queue number from the array. |
Forum: C May 14th, 2008 |
| Replies: 9 Views: 615 |
Forum: C May 14th, 2008 |
| Replies: 3 Views: 338 Timestamp How do i print timestamp to a text file? any sample codes? |
Forum: C May 14th, 2008 |
| Replies: 9 Views: 615 |
Forum: C May 13th, 2008 |
| Replies: 2 Views: 186 client error? #include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
void error(char *msg)
{ |
Forum: C++ May 11th, 2008 |
| Replies: 7 Views: 329 |
Forum: C++ May 11th, 2008 |
| Replies: 7 Views: 329 Re: array and loop I created c[50] and p[100], is it because of that?
The error wasn't clear either, it juz says myfile.exe has stop working. |
Forum: C++ May 11th, 2008 |
| Replies: 7 Views: 329 |
Forum: C++ May 11th, 2008 |
| Replies: 7 Views: 329 array and loop I have a txt file of this format:
2
Jack S123 Y 1
Choco P0001 5.50 2
Jane S456 N 2
Rice P0002 10.00 2
Chicken P0004 7.50 1 |
Forum: C++ May 8th, 2008 |
| Replies: 4 Views: 199 Re: Equation? Thanks a lot. Got a feeling we are doing the same stuff. |
Forum: C++ May 7th, 2008 |
| Replies: 4 Views: 199 Re: Equation? I'm trying to do an >> overload.
istream& operator >> (istream& in, Quaternion& rhs)
{
in >> rhs.a;
in.ignore();
in.ignore();
in.ignore();
in >> rhs.b; |
Forum: C++ May 7th, 2008 |
| Replies: 4 Views: 199 Equation? How do i read in an equation in this format: 1 + 2a + 3b + 4c?
I need to extract only the value 1, 2, 3, 4. |
Forum: C++ May 6th, 2008 |
| Replies: 4 Views: 189 |
Forum: C++ May 6th, 2008 |
| Replies: 4 Views: 189 |
Forum: C++ May 6th, 2008 |
| Replies: 4 Views: 189 help needed How do I overload the input and + operator for quaternion class? |
Forum: C++ May 5th, 2008 |
| Replies: 2 Views: 503 |
Forum: C++ May 5th, 2008 |
| Replies: 2 Views: 503 detect new line Want to ask how to detect new line
For example, I need to read in a text file in this format
John 123 Y 1
abc
def
ghi
Jane 456 N 1 |
Forum: C++ Apr 14th, 2008 |
| Replies: 11 Views: 1,382 Re: Linux pipe question how do i loop through the output of ls-ali?
since it is not output to a file but directly to the c++ program, i can't open the file.
what else can i use? |
Forum: C++ Apr 12th, 2008 |
| Replies: 11 Views: 1,382 |
Forum: C++ Apr 12th, 2008 |
| Replies: 11 Views: 1,382 |
Forum: C++ Apr 11th, 2008 |
| Replies: 11 Views: 1,382 |
Forum: C++ Apr 11th, 2008 |
| Replies: 11 Views: 1,382 |
Forum: C++ Apr 11th, 2008 |
| Replies: 11 Views: 1,382 Linux pipe question Anyone knows how to capture the data pipe in from linux ls command in c++ program?
the command is ls - ali and I need to pipe it to a c++ program by ls - ali|./a.out
how do I code the main in c++... |
Forum: C++ Apr 11th, 2008 |
| Replies: 5 Views: 267 |
Forum: C++ Apr 11th, 2008 |
| Replies: 5 Views: 267 Re: whitespace help getline will get this result?
HH
HHH
GGGGKK
what I want is to get the whole data ignoring the whitespace and assign to a string or array
HH HHH GGGGKK |
Forum: C++ Apr 11th, 2008 |
| Replies: 5 Views: 267 whitespace help Hi,
I have this txt file containing data in this format:
John HH HHH GGGGKK
I want to extract John as 1 field and HH HHH GGGGKK as another field.
How do I ignore the whitespace and read it as a... |