|
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
hi all,
how can i replace a string in file with my own string. for example, i open a file and search string %Pankaj% and replace with them c:\windows\system.i'm new to VC++.
thanks in advance......
Pankaj Jain
|
|
|
|
|
|
Is there a way to build a static library that could be used on both Windows & linux OS?
|
|
|
|
|
you mean something like ACE[^] library?
nave
|
|
|
|
|
|
No, the way it is done generally is that the same code is compiled with two different compilers: one for windows (and it produces a .lib file) and one for linux (it produces an .a file if I remember correctly). You cannot use the same library under windows and linux, because a library contains object code which is not portable.
|
|
|
|
|
Thanks for the quick reply Cédric. [ ]
|
|
|
|
|
You're welcome.
BTW, if you want to compile both for windows and linux (the way I described in my first answer), your code shouldn't use any platform dependant API (like MFC or WIN32 API). But cross-platform solutions exist, like for example ACE (as already said by Naveen) or wxWidgets[^] (something very similar to MFC but cross-platform).
|
|
|
|
|
Yes Cedric, I have taken care not to include any platform dependent code inside the code. Now I just need to build and link the code to diffenent runtimes on respective platforms.
|
|
|
|
|
i want to paste an icon as like inserting breakpoints in vc++.i tried bitmapbutton,pasteicon in static but nothing is efficient..infact if i give a cmd it should remove that icon also..
|
|
|
|
|
What do you mean by "paste"? Draw it on a window?
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
any idea on how can the normally blue color of title bars can be changed.
|
|
|
|
|
Use SetSysColors() with COLOR_GRADIENTACTIVECAPTION and COLOR_ACTIVECAPTION .
|
|
|
|
|
Won't the use of SetSysColor() set the color of the title bars across the OS? If affirmative, this doesn't seem to be a good idea.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
|
How Can I Access And Read Data From Sound Card With Line In Port In Visual C++?
|
|
|
|
|
By Using Direct Show. Search The Site For Articles On How To Do This.
Man, that stuff is hard on the eyes.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus wrote: Man, that stuff is hard on the eyes.
You reminded me of an interesting read I bookmarked a while back about word recognition and eye tracking...
The Science of Word Recognition[^]
|
|
|
|
|
Christian Graus wrote: Man, that stuff is hard on the eyes.
It's hard on one's mental health as well!
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
|
Hi:
I have a variable of "map" type, which is defined as map<string, vector=""> table;.
How can I assign values to this table?
Normally, if "table" is defined as map<string, int="">.
We will simply:
this->table.insert(make_pair(string newString, int newInt));<br />
But this time, vector<> is not a simple variable but a complex one.
Any help is appreciated.
Thank you
|
|
|
|
|
Well, for starters, the vector needs it's own template arguements. Actually, for starters, you should check "Ignore HTML tags in this message (good for code snippets)", I had to view source to understand the question.
I always add to a map using table["string"] = 5; But, I'd imagine the purpose of a map to a vector is that you'd do this:
table["myKey"].push_back(myinstanceofwhatevertypethevectorholds);
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus wrote: myinstanceofwhatevertypethevectorholds
That's a nice variable name
|
|
|
|
|
I have a Piece of code that should only be able to run in one instance on each (LAN)networked computer. Idealy it should behave like Task Manager. i.e.: If one tries to start a second instance, control is transferred to the running instance. Anyone any idea how to do that?
LateNightsInNewry
|
|
|
|