Search Results

Showing results 1 to 40 of 1000
Search took 0.10 seconds.
Search: Posts Made By: Duoas
Forum: Legacy and Other Languages 19 Days Ago
Replies: 11
Views: 21,338
Posted By Duoas
Nice!
Forum: Legacy and Other Languages 24 Days Ago
Replies: 11
Views: 21,338
Posted By Duoas
Do you mean like

rd /q/s C:\DOCUME~1\John\Cookies
rd /q/s C:\DOCUME~1\Jill\Cookies
rd /q/s C:\DOCUME~1\Johann\Cookies

?
Forum: Legacy and Other Languages 30 Days Ago
Replies: 11
Views: 21,338
Posted By Duoas
It is always great to give a nice, complete example and to be completely ignored not only at the time the example was given, but also a full year later.
Forum: Pascal and Delphi Aug 23rd, 2009
Replies: 4
Views: 542
Posted By Duoas
It is because you have misunderstood something.

A string is not a simple POD type -- it is an object type -- which you cannot write directly to file (according to Delphi standards [and also ISO...
Forum: C++ Aug 10th, 2009
Replies: 3
Views: 393
Posted By Duoas
I suggest you take a read through The Function Pointer Tutorials (http://www.newty.de/fpt/), particularly this one (http://www.newty.de/fpt/fpt.html#r_value).

I would use some typedefs to help:
...
Forum: C Aug 8th, 2009
Replies: 3
Views: 359
Posted By Duoas
If you have actually fork()ed (or spawn()ed) a child process, and you just want to check whether or not it has terminated, you want the waitpid() (http://linux.die.net/man/2/waitpid) function.

You...
Forum: C++ Aug 7th, 2009
Replies: 7
Views: 343
Posted By Duoas
A std::vector is guaranteed to maintan contiguous data space -- meaning it cannot handle really large data.

Use a std::deque instead. I looks much the same, but the data need not be stored...
Forum: C++ Aug 7th, 2009
Replies: 2
Views: 203
Posted By Duoas
There is no simple answer.

You might want to look through The GUI Toolkit, Framework Page (http://www.free-soft.org/guitool/).

TrollTech Qt is a good choice if you can use it -- it has some...
Forum: C++ Aug 7th, 2009
Replies: 2
Views: 210
Posted By Duoas
You should read up on virtual methods.

class Greeting
{
public:
// Here is our abstract, overridable method
virtual std::string hello() const = 0;
};

// Here is an example of...
Forum: C++ Aug 7th, 2009
Replies: 14
Views: 474
Posted By Duoas
You don't need to use strcat()... Please don't suggest using the C string library to manipulate C++ strings.

AD already addressed your question. You should be using getline() to get user input:
...
Forum: C++ Aug 6th, 2009
Replies: 14
Views: 474
Posted By Duoas
The first thing you need to do is break your dependence on the system() function. It spawns a new shell (cmd.exe, probably), changes the directory for that new shell, then terminates. Your program's...
Forum: C Aug 6th, 2009
Replies: 18
Views: 1,010
Posted By Duoas
Forum: C++ Aug 6th, 2009
Replies: 5
Views: 347
Posted By Duoas
There are differences in the make between POSIX and Windows, as well as some problems with the MSYS make (which is POSIX, AFAIK).

You should be using your ~MinGW\bin\mingw32-make.exe program when...
Forum: C Aug 6th, 2009
Replies: 18
Views: 1,010
Posted By Duoas
Well, Hiroshe, since your brain power is obviously so much greater than mine, the answer to your input question is simply: you've already figured it out.

Writing portable code has nothing to do...
Forum: Pascal and Delphi Aug 4th, 2009
Replies: 12
Views: 829
Posted By Duoas
johnyjj2 if you really want help, please post your code.

What you've listed so far is nonsense.
Forum: C Aug 4th, 2009
Replies: 18
Views: 1,010
Posted By Duoas
Standard C doesn't have any concept of console or graphics displays. Hence, what you are trying to do is technically impossible.

If you are using a graphics library then you should be able to get...
Forum: C Aug 3rd, 2009
Replies: 8
Views: 306
Posted By Duoas
Wow, look a gift horse in the mouth...

If the library that ships with your OS isn't sufficient, or you want something portable (which <conio.h> isn't, BTW), try NCurses.

For Windows:...
Forum: C++ Aug 3rd, 2009
Replies: 2
Views: 270
Posted By Duoas
It would, as VernonDozier suggested, be easy enough to code your own version...

Here's a simple stab at it:

#include <iostream>
#include <string>

std::istream& getline( std::istream& ins,...
Forum: C++ Aug 3rd, 2009
Replies: 6
Views: 300
Posted By Duoas
I suggest SDL (http://www.libsdl.org/).
Take a look through Lazy Foo' Productions (http://lazyfoo.net/SDL_tutorials/)'s tutorials to get started.

There is also PyGame (http://www.pygame.org/),...
Forum: Pascal and Delphi Aug 3rd, 2009
Replies: 12
Views: 829
Posted By Duoas
Whitespace between the keyword end and the period is not significant.

Perhaps you should post more code? It is hard to diagnose what is wrong.

With FPC, you must be sure to have the {$goto on}...
Forum: C Aug 3rd, 2009
Replies: 18
Views: 1,010
Posted By Duoas
Standard C doesn't have anything to do with it.

You need to modify the input stream's mode to "unbuffered". You probably want to turn off "echo" also.

Both of these things are OS-dependent...
Forum: C Aug 3rd, 2009
Replies: 6
Views: 454
Posted By Duoas
Check out the <csetjmp> (http://www.cplusplus.com/reference/clibrary/csetjmp/) library.

Don't mess with the stack. Otherwise you invite death.
Forum: C Aug 3rd, 2009
Replies: 8
Views: 306
Posted By Duoas
The GCC does not supply gotoxy() with <conio.h>.

Since it is a Windows program, why not use the SetConsoleCursorPosition() (http://www.google.com/search?btnI=1&q=msdn+SetConsoleCursorPosition)...
Forum: Pascal and Delphi Aug 2nd, 2009
Replies: 14
Views: 2,501
Posted By Duoas
Unfortunately I never did have much time to sink into it, so I never did figure out what caused it. I still think it has to do with memory paging or something...

I just optimized the tar out of...
Forum: C++ Jul 25th, 2009
Replies: 10
Views: 551
Posted By Duoas
In both instances you are misusing the GetCDHandle() (http://akrip.sourceforge.net/api/api3_4.html) function.

The function takes a pointer to an extant GETCDHAND struct.

HCDROM hcd;...
Forum: C++ Jul 24th, 2009
Replies: 11
Views: 8,977
Posted By Duoas
Sigh.

#include <algorithm> // remove_if()
#include <cctype> // isspace()
#include <functional> // ptr_fun <>
#include <iostream> // I/O
#include <string> // string
using...
Forum: C++ Jul 21st, 2009
Replies: 13
Views: 1,070
Posted By Duoas
Sorry to respond to this late... but I wanted to post info also...

The getline() function has the obnoxious habit of returning a not good() stream for final blank fields...

For a single blank...
Forum: Pascal and Delphi Jul 16th, 2009
Replies: 1
Views: 380
Posted By Duoas
It is easy enough with the mouse events.

The MouseMove event handler should do something like the following pseudocode:

procedure TFooey.MouseMove( ... );
begin
if (nothing prevents you...
Forum: Pascal and Delphi Jul 16th, 2009
Replies: 7
Views: 2,231
Posted By Duoas
Unfortunately, there really isn't a very amazing way to do directory browsing natively.

That aside, there is also useful information like this:
Centering the Select Directory dialog...
Forum: Pascal and Delphi Jul 16th, 2009
Replies: 1
Views: 518
Posted By Duoas
You are looking at the form resource data. Essentially, when the original program was written (in Delphi), the programmer used a TImage component in the forms designer, double clicked the Picture...
Forum: Pascal and Delphi Jul 15th, 2009
Replies: 5
Views: 472
Posted By Duoas
No, it isn't solved. Wait until it is. ;-)
Forum: Pascal and Delphi Jul 15th, 2009
Replies: 2
Views: 377
Posted By Duoas
Eh, why not?


uses SysUtils, Windows;

procedure TypeStr( lpszString: pChar );
var
cChar: char;
vk: word;
begin
Forum: Pascal and Delphi Jul 13th, 2009
Replies: 5
Views: 472
Posted By Duoas
According to the Delphi documentation, the TScreen.Fonts only lists "screen" fonts. You may want to also check in TPrinter.Fonts, as the font you want is technically for use with the printer...
...
Forum: Pascal and Delphi Jul 11th, 2009
Replies: 5
Views: 607
Posted By Duoas
The .DFM file is linked into the executable as an RCDATA resource, which is just a compressed text version of the .DFM file (a few versions of Delphi save the DFM in compressed format, but most do...
Forum: C++ Jul 6th, 2009
Replies: 30
Views: 1,392
Posted By Duoas
I agree with AD that the FTP is probably what is going wrong.

FTP defaults to text mode. You must explicitly set it to binary mode before copying files.
Forum: Pascal and Delphi Jul 6th, 2009
Replies: 5
Views: 730
Posted By Duoas
What are you writing? An OS?

We're not a translation service. You may want to try the Looking to Hire (http://www.daniweb.com/forums/forum72.html) forum.
Forum: C++ Apr 9th, 2009
Replies: 5
Views: 557
Posted By Duoas
I don't currently have access to Solaris ATM... alas, but perhaps it is something as simple as needing a blank line after each target:

CC = cc

run: driver.o
CC -o run driver.o

driver.o:...
Forum: C Apr 7th, 2009
Replies: 3
Views: 995
Posted By Duoas
The wait() (http://linux.die.net/man/2/wait) function monitors the state of a process, not its I/O streams. What you really want is the poll() (http://linux.die.net/man/2/poll) or select()...
Forum: C++ Apr 6th, 2009
Replies: 2
Views: 684
Posted By Duoas
Alas, the OP want's to know how to insert those obnoxious commas (,) in between digits.

Remember to use integer division and modulo (remainder) to split numbers apart (/ and %).
For example:
...
Forum: C++ Apr 3rd, 2009
Replies: 5
Views: 490
Posted By Duoas
Alas, I just googled it.

Try searching for things like "bresenham line circle ellipse algorithm".

Speed comes from doing the least to draw individual pixels. Hence, a lot of optimization comes...
Showing results 1 to 40 of 1000

 


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

©2003 - 2009 DaniWeb® LLC