Forum: Python Apr 19th, 2009 |
| Replies: 2 Views: 339 Hi, yes, it's hard to figure out what's going on from the description, but it just not possible to post all the code, there's just too much stuff going on there, but here's the relevant parts:
main... |
Forum: Python Apr 19th, 2009 |
| Replies: 2 Views: 339 Hello,
I start a thread that runs exec and sets the global variable to True, meaning that the thread finished. The main thread that creates this new thread runs in a loop while the global var is... |
Forum: C++ Jul 3rd, 2007 |
| Replies: 3 Views: 597 |
Forum: C++ Jul 3rd, 2007 |
| Replies: 3 Views: 597 I recenly read this piece of code:
heap.push((Edge){x, 0});
where Edge is something like
struct Edge
{
int a, b;
};
I wonder how standard this syntax is? do all compilers understand this... |
Forum: Java Apr 23rd, 2007 |
| Replies: 1 Views: 751 Hi, i'm reading from a URL that has cyrillic content, and when i try to display it, it shows lots of questions marks or sometimes other strange letters. how do i make it work correctly ? |
Forum: C++ Jul 5th, 2006 |
| Replies: 4 Views: 1,916 |
Forum: C++ Jul 5th, 2006 |
| Replies: 4 Views: 1,916 thanks hollystyles, interesting thoughts...reading is definately a good suggestion. any particular place i can look where there are _good_ examples of OOP ?
thanks for the rentacoder link. |
Forum: C++ Jul 5th, 2006 |
| Replies: 4 Views: 1,916 Hi, i've been reading about c++ advanced concepts such as polymorphism, (multiple) inheritance, templates, operator overloading and others. It all seems more or less clear to me but i know i would... |
Forum: C++ May 30th, 2006 |
| Replies: 5 Views: 1,122 ok, thanks for the replies! |
Forum: C++ May 30th, 2006 |
| Replies: 5 Views: 1,122 ok, quick question for those who know the standard well. when is a variable (and array and class object) set to 0 by default (all elements, all members) in C++. i know that if it's global it should... |
Forum: C++ May 25th, 2006 |
| Replies: 15 Views: 19,208 what you need is an array of pointers to string, like
const int n = 10;
string *array[n];
array = {"1", "2", ..., "10"};
try it |
Forum: C Oct 26th, 2005 |
| Replies: 2 Views: 1,219 why can't you just strtok(str, "\t\n") ? |
Forum: C++ Oct 8th, 2005 |
| Replies: 6 Views: 14,817 thanks again for responding and for the link. i'll do it the indeces way then. |
Forum: C++ Oct 8th, 2005 |
| Replies: 6 Views: 14,817 thank you, Narue, for replying.
yes, i think i understand how to use ifstream and how to read in a string now. But some things are still not clear.
In your code, what is string::npos ?
How to... |
Forum: C++ Oct 8th, 2005 |
| Replies: 1 Views: 1,592 try this:
int main()
{
int list[MAX];
int t, i,n = 0;
while (cin >> t)
{
if (n < MAX) |
Forum: C++ Oct 8th, 2005 |
| Replies: 6 Views: 14,817 hi, i'm new here and got a really simple problem.
i need to parse a conf file, where # is a comment, like this:
# Begin conf
VAR1 = VAL1
VAR2 = VAL2
# end
i want to skip all comments and... |
Forum: C Oct 8th, 2005 |
| Replies: 4 Views: 4,009 this should work:
const char *request = "GET / HTTP/1.1\r\nHost: www.google.com\r\n\r\n"
http protocol uses \r\n as a new line, and the last line must always be empty. |