Search Results

Showing results 1 to 24 of 24
Search took 0.01 seconds.
Search: Posts Made By: waldis
Forum: C++ Oct 26th, 2006
Replies: 3
Views: 1,097
Posted By waldis
This is what I use, it pauses right before exiting, it's pretty much the same as getchar(), only difference that pressing any key works to exit, where if you use getchar() you have to hit return...
Forum: C Oct 26th, 2006
Replies: 4
Views: 1,177
Posted By waldis
It's brilliant, thank you for saving my head from hitting it against the wall, so to speak.

Thank you,

Waldis
Forum: C Oct 26th, 2006
Replies: 4
Views: 1,177
Posted By waldis
Good point... let me try once more to attach it, I must've done something wrong.
Forum: C Oct 26th, 2006
Replies: 4
Views: 1,177
Posted By waldis
Hi,

Once I had a similar problem when I tried to read a binary file on a pc and I failed, but I was able to read it in Linux (there were actually different versions of the file), so I figured it's...
Forum: C++ Sep 21st, 2006
Replies: 12
Solved: Buffering
Views: 1,931
Posted By waldis
Thank you very much for your help!

Waldis
Forum: Java Sep 21st, 2006
Replies: 2
Views: 1,787
Posted By waldis
I appreciate your input! I really feel that I should've started all this programming adventure some 25 years ago when I was in my teenage years, but time has gone by and I have to settle with what I...
Forum: Java Sep 21st, 2006
Replies: 2
Views: 1,787
Posted By waldis
Hi, I'm trying to get the threads synchronized, but the output I get is still wrong:

Expected sum: 20000000
Actual sum: 10000000

Do I use synchronized wrong, or do I put it in a wrong place?...
Forum: C++ Sep 15th, 2006
Replies: 12
Solved: Buffering
Views: 1,931
Posted By waldis
Here it goes, I got rid of eof() and changed the while loop around...



void getnumber(int *num, bool *endfile)
{
int tmpnum = 0;

// if ncount is larger, buffer is empty
// and it's...
Forum: C++ Sep 13th, 2006
Replies: 12
Solved: Buffering
Views: 1,931
Posted By waldis
Here is what I came up with. The infinite loop the program was giving was a side effect of not being able to read the .dat file for some reason (path was too long or something), so when I moved it to...
Forum: C++ Sep 13th, 2006
Replies: 12
Solved: Buffering
Views: 1,931
Posted By waldis
Thanks for reply!

Here is what the program should do:

------------------------------------------
=======================
------------------------------------------

Your task is to develop...
Forum: C++ Sep 13th, 2006
Replies: 12
Solved: Buffering
Views: 1,931
Posted By waldis
I re-wrote the code, and still having trouble :sad:

Here's code:



#include <fstream>
#include <iostream>
//#include <strstream>
using namespace std;
Forum: C++ Sep 12th, 2006
Replies: 12
Solved: Buffering
Views: 1,931
Posted By waldis
I'm having difficulties to get the buffer read 10 numbers from a file, then after it's empty read next 10 numbers, and so on till eof is reached. The input file contains several lines of data, with a...
Forum: Computer Science Apr 15th, 2006
Replies: 7
Views: 2,519
Posted By waldis
Thank you, Narue. That website is really helpful for more than just a heap sort.
Forum: Computer Science Apr 11th, 2006
Replies: 7
Views: 2,519
Posted By waldis
We were given a heap sort in a pseudocode:


******* HEAP SORT *******

sift(A, l, r)
-------------
f <- l
s <- 2 * l
temp <- A[f]
Forum: Computer Science Jan 17th, 2006
Replies: 2
Views: 2,310
Posted By waldis
Thank you. If I'm correct there should be an else clause before C. Let me rewrite the pseudocoude the way I'm supposed to submit it:

done=FALSE
repeat
A
B
if a then
done=TRUE
...
Forum: Computer Science Jan 17th, 2006
Replies: 14
Views: 5,271
Posted By waldis
Thanks for your help, it starts clicking in, I just need to keep keeping on with these problems and one day it'll click in and stay ;)

Waldis ;)
Forum: Computer Science Jan 16th, 2006
Replies: 14
Views: 5,271
Posted By waldis
Yup, I did miss out 'B' (I guess I should blame my keyboard, how bad it is, etc., but I won't)

What if 'c' is FALSE and 'd' is FALSE, it will go to 'B' insted of 'F' where it should...

Would...
Forum: Computer Science Jan 16th, 2006
Replies: 2
Views: 2,310
Posted By waldis
Could anyone look at this and tell me if I got it right? I had to rewrite the following code without GOTOs:

Y: A
B
if a GOTO X
C
if b GOTO Y
X: D

Here is my solution...
Forum: Computer Science Jan 16th, 2006
Replies: 14
Views: 5,271
Posted By waldis
Ok, here is my solution for it:

A
i=TRUE
while c AND i
if d then
i=FALSE
else
E
F
Forum: Computer Science Jan 16th, 2006
Replies: 14
Views: 5,271
Posted By waldis
There were two problems at the beginning. The first problem was the code with GOTOs and the solution that I wrote was the second code I included. Then I have the second problem, for which I attached...
Forum: Computer Science Jan 16th, 2006
Replies: 14
Views: 5,271
Posted By waldis
There is no 'C' or 'D', only 'c' and 'd', which are flags. A, B, E, and F are processes. When 'A' gets down to 'c' and flags it TRUE, it goes to 'B', if FALSE goes to 'F'. If we get to 'B' the next...
Forum: Computer Science Jan 15th, 2006
Replies: 14
Views: 5,271
Posted By waldis
Thanks for your input.

Now I got completely confused... from c down ir TRUE, and from d down is FALSE.

By saying c after 'if not c then' do you mean setting c to TRUE? And by D you mean d, and...
Forum: Computer Science Jan 15th, 2006
Replies: 2
Views: 1,450
Posted By waldis
Try this:
Open your PC, take our your sound card out and look for the card identifiers (like model number, manufacturer, etc.) go to google, type it in, and search for drivers, you should find it....
Forum: Computer Science Jan 15th, 2006
Replies: 14
Views: 5,271
Posted By waldis
Hi, could someone to direct me the right way with this? Here is the problem, which I think I have nailed:

before:

A
if c then goto X
B
if d then goto Y
C
X: D
Showing results 1 to 24 of 24

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC