comp.lang.c++
  Home FAQ Contact Sign in
comp.lang.c++ only
 
Advanced search
February 2008
motuwethfrsasuw
    123 5
45678910 6
11121314151617 7
18192021222324 8
2526272829   9
2008
 Jan   Feb   Mar   Apr 
 May   Jun   Jul   Aug 
 Sep   Oct   Nov   Dec 
2008 2007 2006  
total
comp.lang.c++ Profile…
RELATED GROUPS

POPULAR GROUPS

more...

 Up
  PLAY IT NOW!!! ..... ITS FREE!!!         


Author: Great Job
Date: Feb 11, 2008 23:08

PLAY IT NOW!!! ..... ITS FREE!!!

http://realinceadvertisers.googlepages.com

http://onlinestockgames.googlepages.com

http://jettrack2searching.googlepages.com

X---------------------------------------------------------------------------
X

Are you Investor?.. Need the Stock Recommadation?..
We will provide you daily, the best Stock calls... GET SUBSCRIBtion
NOW!!
Visit here>> http://mystockcalls.googlepages.com

X---------------------------------------------------------------------------
X

Bollywood Photo Section!!!

## Hottest Kissing of Bollywood!!
>> Madhuri Dixit & Vinod Khanna Kiss..!
>> Amrita Showing her Boobs....!!

http://buzzingactress4hot.googlepages.com

Most Hottest Aishwarya Roy...! ##...!!
Show full article (2.08Kb)
no comments
  Are Base data members accessible in Derived constructor initialiser list?         


Author: Joost Kraaijeveld
Date: Feb 11, 2008 21:26

Hi,

Are Base data members accessible in Derived constructor initialiser list
and is the following legal?

class Base
{
public:
protected:
std::string text;
};

class Derived : public Base
{
public:
Derived(const std::string& aText)
: text(aText)
{}
};

TIA

Joost
6 Comments
  using mutexes         


Author: iceman
Date: Feb 11, 2008 21:07

Hi All,

Suppose that my program is such that

int counter;
pthread_mutex_t mutex1 = PTHREAD_MUTEX_INITIALIZER;
void *functionC()
{
pthread_mutex_lock( &mutex1 );
counter++;
printf("Counter value: %%d\n",counter);
pthread_mutex_unlock( &mutex1 );
}

int main()
{
pthread_t thread_id;
pthread_create (&thread_id, NULL, &functionC, NULL);
//increment counter in main also

}
Show full article (0.63Kb)
4 Comments
  whats te best way to make a language easier to learn for indigenous people         


Author: Greg
Date: Feb 11, 2008 19:05

Lately I have been Customizing C commands into another language
(Shona) to facilitate easier learning of C by Shona speaking people
using pre-processor directives i.e. (#include define)

is there a better way to have C or C++ available in another language.
5 Comments
  how to multithread using c++         


Author: iceman
Date: Feb 11, 2008 18:42

Hi,
I need to implement a timer associated with a state[in a state
machine].In case the statemachine does not get any input for a
particular period of time, the timer should reset and there should be
default action.
How do I implement multiple threads in c++[in linux].

I got this example on the web .its uses 2 threads.but it does not
execute together.
thread 1 executes then thread 2

void *task1(void *X);
void *task2(void *X);

int main(int argc, char *argv[])
{
pthread_t ThreadA,ThreadB;
int N;

if(argc != 2){
std::cout << "error" <<"\n";
exit (1);
}
Show full article (1.39Kb)
8 Comments
  Basic design question, about data structures         


Author: JSeb
Date: Feb 11, 2008 17:10

Hi there gurus,

This is a design question. Hope I'll get some insights!

Trying to get back in shape with C++, I'm writing a nice BST class. So
I have a nice class TreeNode:

template class TreeNode
{
private:
T* mpData;
const TreeNode* mpLeftChild;
const TreeNode* mpRightChild;

TreeNode(const T& aData)
: mpData(&aData), mpLeftChild(NULL), mpRightChild(NULL)
{ }

// ...
};

Type T can be a huuuuuge class, so when I initialize a node with data
of this type, I make mpData point directly to the original data. That
is, I don't call type T's copy constructor.
Show full article (1.47Kb)
4 Comments
  File IO Question         


Author: JackC
Date: Feb 11, 2008 11:17

Hi,

Im having some problems working out how I can read the last 5 bytes of
a file which i already have open. Heres what i have tried:

pFile = fopen ("/home/jc/data.txt" , "rw");

// Some IO here (preserve position pointer required)

// Read in last 5 bytes
fseek(pFile, 5, SEEK_SET);
fgets(buffer, 5, pFile);

// More IO here (resume old position pointer)

fclose(pFile);

This doesn't work because SEEK_SET adds 5 onto the end of the file, i
need a way to set the position to the current end - 5 bytes, whilst
preserving the current position once im done.

Any ideas on how to approach this? I thought about getting the file
size and using fseek with SEEK_SET from the beginning of the file, but
i think this would involve closing/reopening the file which i would
like to avoid.

Thanks alot for any help,

Jack
3 Comments
  Exception Handling Question and Unwinding stack         


Author: DanielJohnson
Date: Feb 11, 2008 10:12

I have a little confusion with this kind of situation.

Suppose there are two functions, Function First allocates a memory and
then call Function Second..... But in Function Second Exception
occurs!!! How can we notify Function First about this in order to
deallocate the memory allocated by First ?

I found something from Stroutup's web page, saying that it can't be
done ?

http://www.research.att.com/~bs/bs_faq2.html#resume

I was thinking that if we can catch this exception in the second
function then either 1) rethrow so that the first function can catch
it then deallocate appropriately 2) Catch and return an error value
OR
The second is that a function doesn't have to catch it at all. The
exception would automatically be rethrow to the first function.

Can C++ gurus throw some insight into such situations ?
3 Comments
  (www.clothes-sneaker-wholesale.com)         


Author: hhf77
Date: Feb 11, 2008 09:12

(www.clothes-sneaker-wholesale.com) shoes wholesalers in china
( linkman ' s MSN : hhf770816@live.cn)
(www.clothes-sneaker-wholesale.com) cheap nike sneakers
( www.clothes-sneaker-wholesale.com) DISCOUNT nike SNEAKERS,Tennis
Sneakers,gucci Sneakers

(www.clothes-sneaker-wholesale.com ) Prada Sneakers,Shoes
(www.clothes-sneaker-wholesale.com ) Jordan's + Wholesale
(www.clothes-sneaker-wholesale.com) jordan wholesale manufacturers
(www.clothes-sneaker-wholesale.com ) nike customes
(www.clothes-sneaker-wholesale.com) cheap tiffany necklace
(www.clothes-sneaker-wholesale.com ) gucci shoes shop
(www.clothes-sneaker-wholesale.com ) Wholesale Distributor Authentic
Nike
Shoes
(www.clothes-sneaker-wholesale.com) cheap wholesale jordans nike
(www.clothes-sneaker-wholesale.com) dsquared manufacturers,dsquared
womens
shoes,dsquared2
Show full article (6.81Kb)
no comments
  (www.clothes-sneaker-wholesale.com) shoes wholesalers in china         


Author: hhf77
Date: Feb 11, 2008 09:11

(www.clothes-sneaker-wholesale.com) shoes wholesalers in china
( linkman ' s MSN : hhf770816@live.cn)
(www.clothes-sneaker-wholesale.com) cheap nike sneakers
( www.clothes-sneaker-wholesale.com) DISCOUNT nike SNEAKERS,Tennis
Sneakers,gucci Sneakers

(www.clothes-sneaker-wholesale.com ) Prada Sneakers,Shoes
(www.clothes-sneaker-wholesale.com ) Jordan's + Wholesale
(www.clothes-sneaker-wholesale.com) jordan wholesale manufacturers
(www.clothes-sneaker-wholesale.com ) nike customes
(www.clothes-sneaker-wholesale.com) cheap tiffany necklace
(www.clothes-sneaker-wholesale.com ) gucci shoes shop
(www.clothes-sneaker-wholesale.com ) Wholesale Distributor Authentic
Nike
Shoes
(www.clothes-sneaker-wholesale.com) cheap wholesale jordans nike
(www.clothes-sneaker-wholesale.com) dsquared manufacturers,dsquared
womens
shoes,dsquared2
Show full article (6.42Kb)
no comments
1 2 3