You are using an automatic variable sent from VB call. That variable, and the string contente, will be destroyed after the function that create the thread returns. The thread instead will be running and looking for the string at the address that you passed in the thread creation, but that address holds only garbage by then...
To make it work create a local string in your code and define it 'static', copy the passed string there, then create the thread.
If you have to start more threads with different strings, I suggest to allocate dynamic memory for each string to make it local for that thread. The thread can release the memory when it doesn't need it anymore.
c in case a global time step is reqd. eg. time accurate problems
No, I mean what is the programming problem? Telling us what you want to do does not give enough information about where you are stuck or what you have tried. If you know the mathematics of the problem then converting that into C++ code should not be too difficult.
Once again you are expecting us to guess what is happening; we cannot see your screen or read your mind. Please edit your message, add <pre> tags around your code to make it readable, and explain exactly what the problem is and where it occurs.
I wanted to calculate outgoing flux on 2D circular grid. So first part of this code is for to get grid point after that i initializes variables on those grid points, now i want to calculate diagonal to get unit normal through it .
above code running upto global time step
Hey guys, I am kind of new with C++. I have an assignment to do which is similar to this one:
My problems are how to read I/O files and how to actually DO this program. I am really lost with it.
This is not my homework, as u can see this link is from 2007. That is why I posted instead of my homework. I need assistance, so I will be able to solve my homework. If you can post something/link that may help me I will appreciate. Otherwise thank you, but I do know about my responsibilities as a student.