|
I tried that myself and it did not. It's about time scanf was consigned to the trash where it belongs.
|
|
|
|
|
i dont know what happened but i used scanf instead of gets and it worked. Love to know how it happened tho.
modified 10-Mar-19 10:55am.
|
|
|
|
|
I explained how in my earlier message.
|
|
|
|
|
Learning programmer need some help. I understand c++ Classes and I used to think I understood namespaces. But while trying to learn templates I'm getting kinda confused what is going on with this template example.
template <typename CharT, typename Traits, typename Alloc>
const CharT* std::basic_string< CharT, Traits, Alloc >::c_str() const [inline]
//and later the definition of the member function c_str()
const _CharT* c_str() const { return _M_data(); }
(a) Do you call the first line the template declaration?
(b) Do you call the second line the template implementation or definition?
(c) It appears to be a scope resolution :: to the member function c_str() but what is the [inline] bracket syntax?
(d)Also I assume the < CharT, Traits, Alloc > are defined in the header (elsewhere) with some value (overloaded or not)?
Just anywhere you can illuminate what I'm missing on the concept.
|
|
|
|
|
I still haven't understood the [INLINE] square brackets thing (yet) but I've begun to understand the templates concept amongst all the syntax MUCH better when I found this Article here on Code Project.
An Idiots Guide to C++ Templates-Part-1
So I guess I'm an idiot since that page helped me more than any I've read previous. A happy idiot now.
|
|
|
|
|
If it's any consolation I have been writing (sort of) C++ code for more than 20 years and still struggle with templates and lambdas.
|
|
|
|
|
Totally agree!
And I still avoid using lambdas as well.
|
|
|
|
|
Thanks Richard and Victor for the consolations. This is a much nicer forum than some. I do try to research before posting but sometimes without help I get stumped.
|
|
|
|
|
Rw237 wrote: (c) It appears to be a scope resolution :: to the member function c_str() but what is the [inline] bracket syntax?
Where did you get this template example from? The only place I've found the [inline] syntax is here (gcc 4.6.3 api docs). That syntax does not show up in the current API docs, nor does it show up in the libstdc++ sources for gcc 4.6.3 or gcc 8.2. It is also not described in the the MS c++ template docs or the template docs at cpprefereence.com. I'm thinking that's a documentation note that c_str() may be declared as an inline function, much the same as the man page for a utility might show optional parameters e.g. find [-H] [-L] [-P] [-D debugopts] [-Olevel] [starting-point...] [expression]
modified 8-Mar-19 13:02pm.
|
|
|
|
|
Thanks k5054, that must be it. Probably only novice learning dummies like me fail to ascertain that. You have cleared up my confusion and I can stop searching for this new mysterious syntax that I've never seen before.
|
|
|
|
|
I managed to get MDI tear off functionality into my app, like VS does. I placed the teared off view window to a dockable pane.
Now I would like to get the Aero Snap (Dragging caption with mouse to monitor top, corners, etc.) functionality for the teared off window.
Someone out there to get me into the right direction?
Regards,
Franz
|
|
|
|
|
This behaviour is MFC native .. your app is a MFC/MDI app ?
|
|
|
|
|
My app is MFC, yes. Found out that snap functionality works only with CFrameWnd inherited windows and not with CDockablePane, as they do not have a DWM caption bar.
|
|
|
|
|
We have a C++ MFC MDI application with a very heavy computational part.
And we want to run it on HPC cluster. Do we need to rewrite the application some specific way to do it? If yes, then what needs to be changed. What the simplest Windows cluster could look like and configured? How to deploy the app and distribute the job?
Thanks.
modified 7-Mar-19 10:16am.
|
|
|
|
|
oleg63 wrote: And we want to run it on cluster. The cluster web site (https://cluster.co/), or one of the mobile apps?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Sorry David,
It's not what I meant.
Question was about the HPC cluster.
|
|
|
|
|
Perhaps this instead?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Yes. If you have some expertise, please share.
|
|
|
|
|
I don't. I was just trying to clarify (for others) exactly what you were asking.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
|
Cause you have to reprogram a lot of code with the CUDA, and our program is already parallelized with the OpenMP.
|
|
|
|
|
Hi,
We have lot of modules to handle with for big applications. So, how will we understand the dependencies?I mean if to compile program using make file, how can I know which all modules to compile with?
|
|
|
|
|
Does your IDE support compiling and linking?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
You are (or, at least, should be) the author of the makefile, hence it is up to you to specify the correct dependencies in it.
|
|
|
|
|
The overriding concept of makefiles is the ability to specify the dependencies in a simple tree. But since you are the one who knows which module(s) depend on which, you are the person who will need to create the tree.
|
|
|
|