|
Where do you want to start? The first thing I sugest you do is get a C/C++ compiler. I hear Microsoft allows one version of Microsoft's Visual Studio to be freely downloaded... try to find if it is true, and if it is then go for it.
Then I would focus on what you will want to do. For interfaces I recommend MFC (because you are into C++, because if you were into C# I would recommend .NET). For checksum algorithms... I suspect you already know what you want the applications to do, right? Checksum algorithms, in C/C++, should come after you are comfortable dealing with memory, pointers, and the like. For that I recommend you read "Teach Yourself C++ in 24 hours". It is a very good book, and it took me 24 hours to read!
Then, at some point, I guess you will want to work with disk files, and serial ports (to send data out of the PC). If this is the case then don't worry, C/C++ and Windows allow very easy access to disk files, and Windows allows easy access to the serial port.
I sugest you come back with specific questions after you get through the first steps: getting a compiler and reading a book (or equivalent web tutorials, if you are not new to programming).
I hope this helps,
Rilhas
|
|
|
|
|
Hi Rihas
Thanks for the replay
Yes you are right.. there is a free fully version for 90 days.
And first is problem that you need to find out of the program visual c++.
I have started to look on it and it looks very interresting.
Where did you buy the book?
Frank
|
|
|
|
|
Hi,
In my application the dialog is set with the background bitmap .I have some buttons in that dialog.Now how can i make the button look flat and should mix with the background of the dialog window i.e,it should not resemble as a button and it should resemble just like a static text.
Thanks in advance,
Radhika.
|
|
|
|
|
You need to make button owner drawn.
see this[^]article to get some help.
|
|
|
|
|
I need to calculate distance (along curver) between 2 points on an ellipse.
I can not find answer from google.
do you still remember the math, or any links?
thx
|
|
|
|
|
|
Hi!
I need to process both ascii and chinese chars to 2 bytes? How do i do that? They are both stored in std::string. Please give an example.
Thanks very much!
|
|
|
|
|
when you say 2 bytes do you mean wchar_t data type? Use the MultiByteToWideChar() function. Although I very often have problems with chinese characters being mapped into two wchar_t characters. Make sure to specify the correct codepage.
|
|
|
|
|
How to specify the correct code page?
|
|
|
|
|
936 = Chinese Simplified
950 = Chinese Traditional
I should also tell you that there are two functions to do this. The one I told you MultiByteToWideChar() takes a codepage, but the second function mbtowc() only takes the strings. I usualy have many probles with the first function, instead of mapping a single character to 1 wchar_t , it instead splits it to 2, which is not unicode. The second function has never failed me. I suggest you try both of them.
|
|
|
|
|
about template
i create template class
<<<<<m_templatedata.h>>>>>>>>
template <class t=""> struct CTDbNode
{
T Data;
CTDbNode(T Value):Data(Value){}
};
<<<<<<<m_templatestructure.h>>>>>>>>>>>
#pragma once
#include "m_TemplateData.h"
template<class t="">class CTDbList
{
public:
CTDbList()
{
pCurrent=NULL;
}
void CTInsert(T Value)
{
pCurrent=new CTDbNode(Value);
}
public:
CTDbNode<t> *pCurrent;
};
example
CTDbList<cstring> d;
d.CTInsert(_T("ddd"));
error:
e:\mystudio\project\shared\shared\m_templatestructure.h(12) : error C2955: 'CTDbNode' : use of class template requires template argument list
e:\mystudio\project\shared\shared\m_templatedata.h(15) : see declaration of 'CTDbNode'
e:\mystudio\project\shared\shared\m_templatestructure.h(11) : while compiling class template member function 'void CTDbList<t>::CTInsert(T)'
with
[
T=CString
]
e:\mystudio\project\shared\shared\cm_selectquery.cpp(6) : see reference to class template instantiation 'CTDbList<t>' being compiled
with
[
T=CString
]
e:\mystudio\project\shared\shared\m_templatestructure.h(12) : error C2514: 'CTDbNode' : class has no constructors
e:\mystudio\project\shared\shared\m_templatedata.h(15) : see declaration of 'CTDbNode'
thank
|
|
|
|
|
Tick the "Ignore HTML tags in this message" button when you post: none of the the "<" or ">" characters can be seen in you post and it's poorly formatted.
Steve
|
|
|
|
|
I'm using a CFile to write to a binary file, and I want to modify some text in it. I would like to know if there is another way then rewriting everything after the position of what i want to modify(by modify i mean that it's probably be longer text). I tried the modeReadWrite to rewrite everything after the position, but for an unknow reason it doesent want to read anything(even in shareDenyNone). I even tried to make two CFile objects, one for reading and another one for writing and it still doesn't work. If you have any idea, please let me know.
|
|
|
|
|
nobody can help me
|
|
|
|
|
Has anyone found a way yet to comprehensively parse a CPP Decorated name, to recover the Original Declaration.
LateNightsInNewry
|
|
|
|
|
That depends entirely on the compiler being used. Here's[^] an article on the name mangling scheme in Visual C++. I don't know how correct it is, but I assume it is. I've seen the mangling scheme before in material published by Microsoft (can't remember where though, sorry!).
--
Transmitido en Martian en SAP
|
|
|
|
|
|
I want to know is it possible to to make a constant variable to hold a value the user of my application at the run of the program choose and i want him to not not chang it again.
thank you
******************
******************
** Ahmed Ismail **
******************
******************
|
|
|
|
|
Ahmed Ismail Mohamed wrote: I want to know is it possible to to make a constant variable to hold a value the user of my application at the run of the program choose and i want him to not not chang it again.
const is an official C++ qualifier.
|
|
|
|
|
but i think that a pointer have the address of const var can do changes, but when i make that i failed
Ahemd Ismail
|
|
|
|
|
If you are declaring a variable as const, and do not want to change it, why on earth are you trying to change it?
|
|
|
|
|
Hello
Ahmed Ismail Mohamed wrote: I want to know is it possible to to make a constant variable to hold a value the user of my application at the run of the program choose
No problem! Make an input and store in that variable.
Ahmed Ismail Mohamed wrote: and i want him to not not chang it again.
Don't call the above function again!!
PS.
I know you are talking about the const_cast operator, but why??
Here is a sample code for what you want quoted from MSDN:
#include <iostream>
using namespace std;
class CCTest {
public:
void setNumber( int );
void printNumber() const;
private:
int number;
};
void CCTest::setNumber( int num ) { number = num; }
void CCTest::printNumber() const {
cout << "\nBefore: " << number;
const_cast< CCTest * >( this )->number--;
cout << "\nAfter: " << number;
}
int main() {
CCTest X;
X.setNumber( 8 );
X.printNumber();
}
-- modified at 1:16 Sunday 3rd September, 2006
In addition to the above, I forgot to mention another more standard way of doing what you want:
1- Declare your data type as a const member of a class.
2- Take the input from the user in a temp variable.
3- Put the value in your const member using the initialization list of the class' constructor.
Regards
|
|
|
|
|
The Standard of English in the phrasing of this request was so bad, I still do not understand what it was all about. The Code snippet above is quite clear, but I've still no idea what question it was realy supposed to answer. I suggest that the poser of this question purchases a copy of Kernighan & Ritchie, and Read it from Cover to Cover.
If nothing else, this will introduce the poser of the question to the English Language
LateNightsInNewry
|
|
|
|
|
Hello
LateNightsInNewry wrote: I still do not understand what it was all about
I believe he was asking about casting a const variable to remove its constancy, change its value once, then recasting it back into a const .
LateNightsInNewry wrote: this will introduce the poser of the question to the English Language
Come on! You already have spent enough time around here to learn CP language!;)
Regards
|
|
|
|
|
Nader Elshehabi wrote: I believe he was asking about casting a const variable to remove its constancy
not so. i believe he wants to know how to initialize a const var whose value will be known only at runtime.
your answer though was correct. making the const var a class member can delay init till runtime. but it is expensive. a better way is to put it in a function as a static const and then init it with an incoming value which has a default. like this:
const int var_name (const int var_val = 0)<br />
{<br />
static const int var = var_val;<br />
return var;<br />
}
then you can use it like this:
var_name (temp1);
temp3 = var_name (temp2);
but beware that if your first call doesn't pass a value the default will be set.
one more advantage is that this way it is much more difficult to use a pointer and modify the value.
-- modified at 5:46 Sunday 3rd September, 2006
----------------------
Mayank Thakore
Learning C++ - since 1998
They didn't print my card right; so I resigned.
|
|
|
|