Welcome to DaniWeb.
Why do you dislike your school so much ? Riga looks like a grand city. If you have problems with QBASIC then post questions in the Basic Software Development board and people will help you.
Welcome to DaniWeb.
Why do you dislike your school so much ? Riga looks like a grand city. If you have problems with QBASIC then post questions in the Basic Software Development board and people will help you.
What makes you say that they are otherwise?
LOL My wife tells me I sometimes act as if I'm in my third childhood ;)
moved
What compiler are you using because mine gives a couple errors about using uninitialized variables which you need to fix before attempting to run that program.
I understan pirates, but why not modders? My understanding is that they create modifications of the games -- Diablo LOD ((C)Blizzard) had lots of them that are fun to play. Some games are writtin with that in mind.
ok, I understand.
How many people here would like a forum like that?
Yeah, I'm a teenager too.
I think I would and I have not been a teen-ager for many years now. :) My grandon is a teenager -- does that count :*
Ps: the definitions of list, vector.. in headers LIST, VECTOR...
are really difficult to understand. Why does that coder write that
complicated codes? To avoid the codes being understood by others?
:)
I agree -- and I don't bother any more trying to read those header files. You can find better explanations for the stl classes with google. And you can find some example programs with google too. Also check out the c++ code snippets here at DaniWeb.
you are making it too difficult! All you have to do is find the last character, save it to another variable (or just print it), replace it with a 0 to truncate the string, then print the rest of the string as you normally would. There are no loops needed.
yes it can be done, and yes it is more complex then doing it from basic or java.
There are several free c++ classes that make database accessing easier -- see these google links
There are other ways to do it too, but ODBC is the most versatile because your program doesn't have to know anything about which database it is as long as it knows the connection string.
Interesting thread even though it is a few years old. I've had similar thoughts about deleting old unused accounts and now I know why they aren't deleted (admin nightmare) :ooh: But I would think the hard drive would eventually become chucked full of data about old obsolete accounts.
moved
If your using Linux the "time" command will do nicely.
time() resolution is only to 1 second -- not accurate enough for profiling. clock() however normally has a resolution of 1 millisecond.
There are two versions of MessageBox -- one for UNICODE (the W at the end) and one for single-byte languages such as English (and has an A at the end). The error message makes it obvious you are compiling your program for UNICODE with requires wchar_t* instead of char* as the first argument. One of two solutions:
1. convert the arguments to unicode by surrounding the text with _TEXT macto like this _TEXT("Hello World")
2. Don't compile for UNICODE How to do that depends on the compiler and for Microsoft it depends on the version of the compiler.
[edit]which is exactly the same suggestion as posted by theKashyap, above [/edit]
You are using the fread function incorrectly by swapping the position of the second and third parameter. The second parameter is not the size of the entire file, but the size of each chunk.
Try changing to
fread(iobuf, nblocks, filesize, in)
and it should work out to be fine.
I don't think it makes any difference -- I usually do it the way the OP posted and have never had a problem. But, as Narue will probably say, in general it may not be safe to do that.
echobase: post your current program and attach a copy of the file you are working with.
one way is to buy a commercial profiler program :)
But the easiest way is to call clock() to get the current time before starting the algorithm, then call it again after the algorithm is finished. The difference is the execution time. But be warned that the algorithm might execute so quickly that the time is unmeasurable. In that case call the algorithm in a loop for maybe a thousand or so times.
moved
don't use c style file i/o and strings in c++ programs. Yes its valid to do that but c++ file i/o and c++ string class are generally easier to use and makes your program less buggy.
c++ vectors and lists are the containers that will make it almost trivel to resize. You can create a 2d vector (rows and columns) by using a vector of vectors, something like this.
typedef vector<string> COLUMNS;
vector<COLUMS> rows;
you can think our liberal friends, such as the ACLU, for that. God forbid cartoons show any kind of violence because it will destroy our children's minds :@ I've been watching them for the past 60 years and my mind is perfectly ok, thank you very much. My children are now in their 40s and they turned out ok too.
your second version with the quotes around the zero is the correct version. If you look at any ascii chart (just google for it) you will see that '0' is printable, but 0 is not.
my guess is that $a0 does not contain what you think it contains. To check, I think I would just simply hard-code something in the register just to get it to work.
I'm going to estimate that over the next two years it will sell 10,000 copies. The theological theme is something pastors really use, alot (without getting too specific). I think 10,000 is a fair number, it could be a lot more.
That's quite a few copies so maybe getting a royalty would be the best way if you get at least 50 cents/CD.
still, thats a good attempt looks real and alot of work was put into it lol.
how cool would it be if that happend!!
you wouldn't think it was so funny if it really happened in your area. Try laughing when your body is nothing more than ratioactive dust particles.
my guess is the screen is not 24x79. Try increasing the value of dx to test that out unless, of course, you have already thought of that and tried it.
sorry I don't know MIPS assembly, but if a register contains a single digit then simply add '0' to it
mov ax,5 ; a numeric digit in register ax
add ax,'0' ; make the digit printable
;; now print the digit in register ax
line 44 should have read < filesize
because it is reading filesize bytes.
>>But can you tell me if in the for loop I should be reading each char in ptr into a new target array that should then be passed to an fwrite function for streaming to the target file
No you don't have to create another array. In the for loop I posted just use fputc() to write out each character one at a time. The operating system will buffer them up and optimize the write to disk.
Depends on how many copies of the cd you think they can sell. Just a dozen or so, hundreds, thousands, or millions? The subject you described is something that will appeal only to a rather small segment of society. At $15.00/CD you won't get much of a royalty so I would probably opt for option 2 and they, not you, will own all rights to the program.
I don't hate anyone. But it annyoed me that I my supervisor and I would discuss a problem and agree upon a solution, then a week later she would deny the whole thing.:@ I threatened to use a tape recorder next time.
1. Open the file for read, call fseek() to seek to the end of the file, then call ftell() to get the length of the file. Alternatively you can get the file length by calling stat() or fstat().
2. Allocate a buffer pointer to the file size obtained in #1, above.
3. Read the entire file into that buffer -- you can probably use fread() to read the file all in one shot (assuming the file is small enough).
4. Use another char pointer to transverse the file from end to beginning of the buffer. Something like this example
char *ptr = 0;
char *iobuf = malloc( fileSize );
fread(iobuf,fileSize,fp);
for(ptr = iobuf; ptr >= iobuf; ptr--)
{
// do something with the character at *ptr
}
free(iobuf);
Note the above code snipped does not contain any error checking, which you should add in your program.
Can we close this now?
I don't think that's necessary -- it will probably die on its own. And DaniWeb rules don't permit closing a thread just because someone bumped it.
Actually, in many places in Spain people frown upon you if you walk on the grass. They put signs on the grass saying: Stay off the grass!.
Some people do that here. The people that spend day and night to make their yards look good. It's funny that some people water their grass just to cut it later.
When I was on USA military active duty it was a crime to walk on the grass -- a guy (or gal) could be punished for it by having to clean up a square mile or so of trash that's on the roads/grass. And to this day (30 years later) I don't walk on people's grass, nor do I permit kids and other people to walk on mine.
the study of psychology is chucked full of useless facts. just read a phych 101 book!
tutorials -- no such thing. you just have to study the hardware specifications because each is different. And embedded c language may be slightly different from ansi c because of hardware limitations.
If you want to program for WinCE or Windows 5.0 Mobile then there's a fair amount of documentation on those operating systems and compilers.
Gosh! when did Jack Nichalson change his name and become a C
programmer?!!
And what makes you think Nichalson doesn't know how to program in C ?
function perkey() is using an unitilized pointer ptr Is the intent of that function to copy the contents of one string into another and return the pointer to the new string? Like strcpy() ? If so, then you need to call malloc() first to allocate memory for the new string.
printArray -- why are you using a loop to print each individual character when cout will print the entire string in one shot ?
And yes, you should have just started a new thread to ask your question.
[edit]Ok , ok so I failed to look at the datestamp of egemen's post -- three months old :-O [/edit]
yes, but use the hex form that's used in the code you originally posted. If you want to compile for versions of IE above IE5 then use 0x0500.
Whats a semi?
A lorry in UK, but they are a lot bigger here as shown in the picture that Christia->you posted.
what's the value of _WIN32_IE ? Most likely your program did not define it.
it runs ok just like my xp did but is 1gig good fro game for the vista
cheers
bondi 007
Depends on the game -- Chess Titans, Solitaire, Hearts, etc all run ok on 1 gig. I also like Silverfall which was horribly slow so I bought another gig. It ran a lot better but still somewhat sluggish. Someone told me Vista wants all programs to run completly in memory and not swap from its own program file as it would have in previous versions of MS-Windows.
The source was probably TheOnion.
how did he get stuck facing foward if he was crossing the road?
maybe he (the man in the wheelchair) should have gotten a DWI ?
I don't think there is such a thing as pixel brightness -- its eather color X or its color Y. There are hundreds of different shades of each color but I don't think they all have the same brightness unlike the old ancient MS-DOS color scheme.
But I could be completly wrong about that too.
.. does daniweb even have a 'bad word' filter..
Yes there is such a filter. Not all naughty words are caught though. See the Rules for more informatio.
I usually visit relatives. Went to Branson Missouri one year and enjoyed all the country & western music.
>>now how do i urge the users to click on the ADS plese give me a word of advice.....
A sure-fire way to lose all 800 members is to tell them they have to click on the adds. If you did that to me when I joined your site you would never see me again.
I think you need to spend a lot more time learning the c++ language before attempting to do that sort of suff, unless of course you are very very intelligent and have already mastered the language basics.
I seems Dani and I are the only two active team members left -- what happened to everyone else?
>>Can Dani or her team member answer my question so we can close this?
HappyGeek already did in his post immediately following yours.
>>And what I see after few posts? Some of the members starting flaming war between them ! ! !
I agree, and they are walking on thin ice (meaning infraction) if they continue that.
It is posted in the correct board, but the c++ language itself does not support specific hardware, writing device drivers is job of the hardware manufacturer and not the c++ language standards committee. I guess from your comment you know little if anything about either c or c++ ?
I don't know how to use it but it is definitely not c++ language related (that is, it is not part of the c++ language). It is just a method of communicating with scsi drives, as short of explained here..
at line 42 add another loop to encrypt the line as suggested earlier then output the result to the screen as illustrated by joe.