|
If you don't insist on an "index" of builds you could use the __DATE__ and __TIME__ macros which give you the build date-time combined with some pre or maybe post build step that deletes the OBJ file or maybe updates the file time to make sure the file you put the creation of a build number into will get built every time (you can make the post or pre build step only in your release target if that suits you).
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
Thanks, but I'm looking for an incremental increase in the build number.
Jeff
|
|
|
|
|
|
Yes, I already had searched but when I found lots of articles where a macro was written, I noticed that each article had lots comments about bugs, and instead of weeding through the umpteen articles I decided to post my question here to this forum.
So, back to original question, what do people here use?
(if you use one of the macros from one of the articles then please recommend it)
And does Visual Studio have an auto-increment feature available to C++ like managed projects do?
Thanks,
Jeff
|
|
|
|
|
jeffb42 wrote: (if you use one of the macros from one of the articles then please recommend it)
Nah, I am old fashion and I manually change my build numbers.
jeffb42 wrote: And does Visual Studio have an auto-increment feature available to C++ like managed projects do?
No, unfortunately Visual Studio C++ users do not get those überlegen modern features.
This Microsoft Help and Support article has a sample build increment, I have never tried it.
How to increment version information after each build in Visual C++[^]
Good Luck,
-David Delaune
|
|
|
|
|
jeffb42 wrote: * If not, are there any suggested tools or add-ins?
See here.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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
|
|
|
|
|
I know about the win32 function calls to detect the caps lock key, but does anyone know if there is a cross platform way to do it? Is there anything in the standard library for checking that?
|
|
|
|
|
forrestcupp wrote: Is there anything in the standard library for checking that?
No, there is no standard C/C++ function for checking the status of the keyboard LED.
Best Wishes,
-David Delaune
|
|
|
|
|
I don't really care about the keyboard LED. I really just want a way to tell when the caps lock button has been pressed.
Is there any way to do that?
|
|
|
|
|
forrestcupp wrote: I really just want a way to tell when the caps lock button has been pressed.
Is there any way to do that?
Yes, but not cross-platform.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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
|
|
|
|
|
i have a byte array in a string that i read from a resource
i used CString for example , i can use any other string types
i want to convert a comma delimited byte array string
CString stringarr = "5,10,15,20,25";
to unsigned char[]
unsigned char myarray[]={5,10,15,20,25};
i tried some for loop but result is always different than actual data
maybe i am doing something wrong with that
can you help me please
thanks.
|
|
|
|
|
You should take a look at the strtok_s[^] function. There's even a very similar example as yours.
|
|
|
|
|
Have also a look at CString::Tokenize method [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
How to add codepage 936 in VC++ ?
|
|
|
|
|
How about _setmbcp(936) ?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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
|
|
|
|
|
Hi,
I am getting a problem with the CComboBox::GetItemDataPtr function
i have the following code
TCHAR *szFilePath = new TCHAR[MAX_PATH + 1];
ZeroMemory(szFilePath ,MAX_PATH);
_tcscpy(szFilePath ,_T("C:\Documents and Settings\user\Desktop\Scrollbar.xml"));
int nIndex = m_Combo.AddString(_T("ScrollBar"));
m_Combo.SetItemDataPtr(n , szFilePath);
using the Above code am setting the ItemDataPtr to a Buffer.
On the Selection change event of ComboBox
i have the following code
void CRegDlg::OnCbnSelchangeCombo()
{
// TODO: Add your control notification handler code here
int nIndex = m_Combo.GetCurSel();
void *szFilePath = m_Combo.GetItemDataPtr(n);
}
but the GetItemDataPtr() in OnCbnSelchangeCombo always returns a Bad
pointer. I don't know what is the actual problem with my code. Is there anything i want to do to get the actual buffer from void*.
thanks
Nitheesh
Jose Jo Martin
http://www.simpletools.co.in
|
|
|
|
|
Nitheesh George wrote: _tcscpy(szFilePath ,_T("C:\Documents and Settings\user\Desktop\Scrollbar.xml"));
Are you intentionally not using double backslashes?
Nitheesh George wrote: m_Combo.SetItemDataPtr(n , szFilePath);
Shouldn't this be:
m_Combo.SetItemDataPtr(nIndex, szFilePath);
Nitheesh George wrote: void *szFilePath = m_Combo.GetItemDataPtr(n);
Shouldn't this be:
TCHAR *szFilePath = m_Combo.GetItemDataPtr(nIndex);
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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
|
|
|
|
|
Hi David,
thank you for your reply. Now i realize what is wrong with my code.
thanks
Nitheesh
Jose Jo Martin
http://www.simpletools.co.in
|
|
|
|
|
|
neha_rai wrote: i have written this code that splits the number of cars T. to the number of paths R in all possible ways.
Sounds like you need to read up on combinations and permutations.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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
|
|
|
|
|
Hi all,
I have two applications in VC6.
I have to copy only a single dialog box (not the entire RC file) from one application
to other.
I know we can copy the RC file , but I dont want the entire RC file.
I want to copy only one dialog box from the one RC file and paste in other RC file.
Please suggest.
Regards,
Sunil Kumar
|
|
|
|
|
Hi,
Open the rc file on a notepad or if u r using VS2005 or greater right click on the rc file -> View Code
copy the Dialog declaration's and paste it into your rc file.
thanks
Nitheesh
Jose Jo Martin
http://www.simpletools.co.in
|
|
|
|
|
So I've taken it apon myself to finally get a better grasp on C++. I've had experience in C#, VB.Net and Java and decided, on my own time, to finish the jump into C++.
I've read a book entitled C++, How to program by Deitel, and it is by far way better then the C++ Primer Plus I went through and entirely better then the mistake that was "C++ in 21 days" which was a complete waste of time.
I think I have a handle on the basic concepts, syntax and whatever else the book went through and I think I'm ready to tackle a book that deals with C++ and the MFC. Anyone out there who's been at where I am, still a beginner ready to tackle new concepts (as I've been explained, MFC is where I should go) can please recommend a good reference / beginners book on C++/MFC? Any links on the internet? Anything at all to make a good jump?
A book / article that deals with C++/MFC and using Visual Studio as a compiler is a plus, and any help at all would be greatly recommended. Thanks for the read in advance,
Elie.
|
|
|
|
|
Hi Elie,
I'm pleased to see a .NET programmer wanting to learn Visual C++. My MFC book recommendations are here[^]. I'm sure that others here will be able to provide you with more inputs on that.
Additionally, Thinking in C++ is an excellent, two part book by Bruce Eckel and is freely (and legally) available for download on his site. You can download it : here[^] (the link is actually a mirror, because Bruce's site seem to take too long to load). I did notice you saying that you've done the basics, but this book(s) is one of my favourite C++ books and is worth a read, if you haven't read it yet.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
I've been reading o lot on the topic of comparisons in the web lately and I can't find anything interesting. The question is how to compare string output to a map where keys are alike defined strings which represent vectors of integers. I guess I'll have to write a template or a class to do it and it isn't an easy task for the beginner. I would be very grateful for any kind of help!
Waldemar
|
|
|
|