No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
11 Posted Topics
hi, i'm having trouble compiling this code: SparseMatrix.h: [CODE] #ifndef SPARSE_MATRIX #define SPARSE_MATRIX #include <ostream> class SparseMatrix { //class data ... SparseMatrix operator+(const SparseMatrix& rhs) const; SparseMatrix operator*(const SparseMatrix& rhs) const; }; ostream& operator<<(ostream& out, SparseMatrix& rhs); #endif [/CODE] SparseMatrix.cpp: [CODE] #include "SparseMatrix.h" ostream& operator<<(ostream& out, SparseMatrix& rhs) { ... … | |
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 False. The problem is that the exec job is also running in a … | |
hi, i'm new here and got a really simple problem. i need to parse a conf file, where # is a comment, like this: [CODE] # Begin conf VAR1 = VAL1 VAR2 = VAL2 # end [/CODE] i want to skip all comments and read VAL1 and VAL2 to members … | |
I recenly read this piece of code: [CODE]heap.push((Edge){x, 0});[/CODE] where Edge is something like [CODE]struct Edge { int a, b; }; [/CODE] I wonder how standard this syntax is? do all compilers understand this and is it ok to write such code? | |
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 ? | |
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 never really understand all these language features until i've used them. the problem is that i don't know … | |
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 be (is it?). are there any other cases? | |
Re: what you need is an array of pointers to string, like const int n = 10; string *array[n]; array = {"1", "2", ..., "10"}; try it | |
Re: 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. | |
Re: try this: [CODE] int main() { int list[MAX]; int t, i,n = 0; while (cin >> t) { if (n < MAX) list[n] = t; else { cout << "list is full" <<endl; break; } n++; } return 0; } [/CODE] |
The End.