|
What are the rules?
Steve
|
|
|
|
|
well, its the English language, so there is alot of them, but I will make a start. I only have 10 minutes so I can't give you many until later on.
1) The letter Q must always be followed by the letter U. eg "QUeen".
2) There can be no more than two of a single letter next to each other. eg "eFFort", "ardvAArk".
3) There can only be one of the same letter at the beginning of a word - you cannot put two of the same letter at the beginning. eg "Grace", "Barrage".
4) ...more to come.
|
|
|
|
|
These rules are really the hard part or the program, the rest is brute force. I'll wait until you post more rules before I make any suggestions.
Steve
|
|
|
|
|
Sauce! wrote: 1) The letter Q must always be followed by the letter U. eg "QUeen".
So much for burqa, qwerty, tranq, suq, sheqel, et al.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
lol, I'm sure that I can discount those words for now, seeings as the word DEFINITELY didn't have a Q in it. :P
|
|
|
|
|
hi,
I have to read a file content and i have to copy that content to buffer(char *buffer),this buffer is one of the parameter of a function(that is i have to pass the content as a parameter to a function).And iam confused how to start it???
Help me with your suggestions
Thanks in advance.
Siddharth
|
|
|
|
|
CStdioFile::ReadString
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
siddharthsan wrote: I have to read a file content and i have to copy that content to buffer(char *buffer)...
So what's troubling you? Are you using C, C++, VC++, or MFC? There are many solutions but you've not even provided a starting point for us to work with.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
how to write into a file to a particular loaction in vc++
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
See Seek/SeekToBegin/SeekToEnd of CFile
|
|
|
|
|
CFile::Seek()
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
deeps_cute wrote: how to write into a file to a particular loaction in vc++
what type of file... BInary or Text
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
When a file is opened, the file pointer is positioned at offset 0, the beginning of the file.
You can reposition this file pointer in a previously opened file. The Seek function permits random access to a file’s contents by moving the pointer a specified amount, absolutely or relatively.
|
|
|
|
|
Paresh Chitte wrote: When a file is opened, the file pointer is positioned at offset 0, the beginning of the file.
Every Question have Reason hidden behind it! seeking and positioning in Text file is mush easier the doing that in binary file. when data stored in file is of different length. my concern is only that!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
How to select an item from ListControl on mouse moving over it?
|
|
|
|
|
|
Use Following code,
void CMyListCtrl::OnMouseMove(UINT uFlags, CPoint point)
{
int nItem = HitTest(point, &uFlags);
if (uFlags & LVHT_ONITEM)
{
SetItem(nItem, 0, LVIF_STATE, NULL, 0, LVIS_SELECTED,
LVIS_SELECTED, 0);
}
CListCtrl::OnMouseMove(uFlags, point);
}
|
|
|
|
|
|
I have several projects in one solution, after i build one project and run(don't build other projects), it will always tell me: "These project configuration(s) are out of date ...", i don't want that information, how can i do.
I know in vs2003, there's no such project, but currently i don't want to buy vs2003, because it will need me extra money.
Anybody can help me, thanks
|
|
|
|
|
hi i have to check for the machine if its HP machine then i have to open a file named syslinux.cfg and search for the word acpi if it is not there i have to set as acpi = off . if it is acpi = off then i have to change it as acpi = off. i tried this i can find out the machine. the machine name will be hp or hewlett packard. how to read the file and write as acpi = off. can anyone help me
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
I dunno how on earth you check if it's HP.
iostream and fstream are the headers you need. Something like ifstream f("c:\whatevr\syslinux.cfg"); then you can read it any way you like ( i.e. use google to find a tutorial on the file streams )
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 )
|
|
|
|
|
deeps_cute wrote: i have to check for the machine if its HP machine
.. need an optical scanner to "view" the "HP" logo on the CPU box?
Press: 1500 to 2,200 messages in just 6 days? How's that possible sir?
Dr.Brad :Well,I just replied to everything Graus did and then argued with Negus for a bit.
|
|
|
|
|
yes i need to check it is HP machine or not. is there any function to get this
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
Hello! I get an unhandles exception message when debugging..here is the code. I can't figure out what the problem is.
U8* Yarray =0;
U8* Uarray =0;
U8* Varray =0;
Yarray = (U8*) malloc( W*H );
Uarray = (U8*) malloc( W*H );
Varray = (U8*) malloc( W*H );
for ( y = 0; y < H; y++ ) {
for ( x = 0; x < W; x++ ) {
...
*Yarray++ = Yval;
*Uarray++ = Uval;
*Varray++ = Vval;
}
}
Yarray-=H*W;
Uarray-=H*W;
Varray-=H*W;
U8* Dst = static_cast< U8* >( m_imgImgMap.GetBits() );
for ( y = 0; y < H; y++ ) {
for ( x = 0; x < W; x++ ) {
U8 r = static_cast< U8 >( *Yarray + (1.4075 * (*Varray - 128)) );
U8 g = static_cast< U8 >( *Yarray - (0.3455 * (*Uarray - 128)) - (0.7169 * (*Varray - 128)) );
U8 b = static_cast< U8 >( *Yarray + (1.7790 * (*Uarray - 128)) );
SET_RGB( Dst, x, y, r, g, b );
*Yarray++;
*Uarray++;
*Varray++;
}
}
pStatus->SetPaneText( 0, _T( "" ) );
fclose (pFile);
free(Yarray); <<unhandled exception="">>
free(Uarray);
free(Varray);
|
|
|
|
|
Try changing this:
Yarray = (U8*) malloc( W*H );
Uarray = (U8*) malloc( W*H );
Varray = (U8*) malloc( W*H );
to this:
Yarray = (U8*)malloc(W*H*sizof(U8));
Uarray = (U8*)malloc(W*H*sizof(U8));
Varray = (U8*)malloc(W*H*sizof(U8));
If you're using C++ you it would be better to use new and delete however. i.e.
Yarray = new U8[W*H];
Uarray = new U8[W*H];
Varray = new U8[W*H];
delete [] Yarray;
delete [] Uarray;
delete [] Varray;
Even better would be to use a std::vector .
Steve
|
|
|
|