Showing results 1 to 40 of 500
Search took 0.06 seconds; generated 3 minute(s) ago.
Posts Made By: Duoas
Forum: C Nov 20th, 2008
Replies: 3
Views: 286
Posted By Duoas
Re: image processing in c plzz very imp need urgent help !!!

Pattern recognition and image analysis is a complex subject. You are better-off hiring someone to do it.

Good luck!
Forum: C++ Nov 20th, 2008
Replies: 14
Views: 499
Posted By Duoas
Re: Crash Windows

>So there's absolutely no way possible for the average person to write to it?
No.

>I was just curious, I absolutely do not want to make any type of virus, trojan, or malware.
Anything that...
Forum: C++ Nov 20th, 2008
Replies: 10
Views: 415
Posted By Duoas
Re: Reading a file. Copying over to other file. Renaming. Renaming = -1?

The documentation for rename() plainly states that if a file with the new name already exists, results are implementation-defined. You are better off deleting any existing 'new name' file first.

The...
Forum: C++ Nov 20th, 2008
Replies: 5
Views: 230
Posted By Duoas
Re: Free safe DLL to play with

First off, you are being a bit pushy. Stop. Sometimes it takes a day or two to get a (useful) answer.

Secondly, if you can't use C++, then you are posting in the wrong forum.


A good DLL to play...
Forum: C++ Nov 20th, 2008
Replies: 14
Views: 499
Posted By Duoas
Re: Crash Windows

No.

The kernel is write-protected and you have to know the right magic to get past that.

Deliberately crashing the kernel isn't funny. It is downright dangerous. You can utterly destroy your system...
Forum: Pascal and Delphi Nov 20th, 2008
Replies: 9
Views: 621
Posted By Duoas
Re: Bug in Free Pascal

Hmm, you are right. My TP4 and TP5.5 both barf on both @x and addr(x).

This is one of those (relatively few) things that Borland did wrong (stunting the language). Alas. The only to make things work...
Forum: Pascal and Delphi Nov 16th, 2008
Replies: 4
Views: 706
Posted By Duoas
Re: Inno Setup Questions

I don't know how you have your script set up, but the [Tasks] and [Components] sections are specifically designed for this. Every "task" you list in the tasks section indicates some component to...
Forum: Pascal and Delphi Nov 16th, 2008
Replies: 9
Views: 621
Posted By Duoas
Re: Bug in Free Pascal

It isn't a bug. Free Pascal is a little more strict about certain things than TP.
Your program should read:

program fred;

type funcparam=function(x:real):real;

function jim(x:real):real;
begin
...
Forum: C++ Oct 6th, 2008
Replies: 14
Views: 1,619
Posted By Duoas
Re: Alternative for cout << "";

Sorry I've missed the last week (more or less).

To do fancy stuff with the console use the Curses library.

NCurses
Platform: POSIX
Where: http://www.gnu.org/software/ncurses/
Notes:
If you are...
Forum: C++ Oct 3rd, 2008
Replies: 19
Views: 1,158
Posted By Duoas
Re: how to identify which OS I am using

Sigh. You know, you really shouldn't be dinking with the screen at all. But if all you want is something to clear the screen in Win32 and POSIX, here are a couple of functions. Your teacher will know...
Forum: C++ Oct 2nd, 2008
Replies: 19
Views: 1,158
Posted By Duoas
Re: how to identify which OS I am using

If this is just some homework problem, you could try one, then the other. Only one will work:

if (system( "clear" )) system( "cls" );


However, like ArkM said, better to do it the Right Way.
Forum: C++ Oct 1st, 2008
Replies: 19
Views: 1,158
Posted By Duoas
Re: how to identify which OS I am using

The exact macro to test for depends on OS and compiler. Here is a handy reference for Pre-defined C/C++ Compiler Macros (http://predef.sourceforge.net/).

Unless you have been careful to predefine...
Forum: C++ Oct 1st, 2008
Replies: 4
Views: 271
Posted By Duoas
Re: Keys in C++

I think the OP is interested in unbuffered input.

Win32: use <conio.h> stuff (me goes to wash my hands) or the Win32 Console Functions (http://msdn.microsoft.com/en-us/library/ms682073(VS.85).aspx)...
Forum: C++ Sep 27th, 2008
Replies: 7
Views: 377
Posted By Duoas
Re: priority of Function

You can't. The main() function is, by definition, the first function your program runs.

What difference does it make? Just call your function first thing in main:

int main()
{
my_init_func();

...
Forum: Pascal and Delphi Sep 24th, 2008
Replies: 2
Views: 589
Posted By Duoas
Re: DelphiMagic - Tips about Delphi

Use Google Translate (http://translate.google.com/translate_t#).
Forum: C++ Sep 24th, 2008
Replies: 4
Views: 502
Posted By Duoas
Re: Bit String help

I think you'll have to go ask your professor for clarification. Sorry.

Oh, the bit position is indexed like an element of an array. So if your bits do represent strings (as in vector <string>...
Forum: C++ Sep 24th, 2008
Replies: 3
Views: 577
Posted By Duoas
Re: reading arrow keys from keyboard

Yes, you really are asking an OS and SDK-dependent question.

If you are using something like SDL, then respond to the key events that SDL gives you. Most GUI/graphics toolkits will give you a way to...
Forum: C++ Sep 24th, 2008
Replies: 11
Views: 516
Posted By Duoas
Re: Processes in C++?

Good grief. Only use TerminateProcess() to kill the unruly.

Otherwise, just ask it nicely: send it a WM_CLOSE message. If it doesn't respond in, say, 500 ms or so, use CreateRemoteThread()...
Forum: C++ Sep 24th, 2008
Replies: 4
Views: 502
Posted By Duoas
Re: Bit String help

Your assignment is the kind of exactingly vague description I've come to expect from CS instructors. Do you have an exemplar of the input file? I will assume some things from here on:

A bit string...
Forum: Pascal and Delphi Sep 23rd, 2008
Replies: 1
Views: 662
Posted By Duoas
Re: Get process name that uses file

You'll need to create a system snapshot and walk the processes and modules.
MSDN Tool Help Library (http://msdn.microsoft.com/en-us/library/ms686837(VS.85).aspx)

If you don't need to do it...
Forum: C++ Sep 23rd, 2008
Replies: 1
Views: 280
Posted By Duoas
Re: Shared Memory -- Pointer problem

You won't get any source... and you'll have to read your textbook, but think for a moment:

Should objects in shared memory be referencing things in the private memory of any process or thread?

Hope...
Forum: C++ Sep 23rd, 2008
Replies: 9
Views: 739
Posted By Duoas
Re: How to the return value of main

This is one of those perennial questions...

system() returns the exit code of the command shell (probably bash --or if your system is really old, sh [check your /usr/bin/sh to see if it is a link to...
Forum: Pascal and Delphi Sep 20th, 2008
Replies: 11
Views: 2,596
Posted By Duoas
Forum: Pascal and Delphi Sep 19th, 2008
Replies: 11
Views: 2,596
Posted By Duoas
Re: reverse the order of words in a sentence

Isn't that what I suggested in #4?
Forum: C++ Sep 18th, 2008
Replies: 2
Views: 334
Posted By Duoas
Re: 3x3 Determinant Help.

Your math is off.
http://en.wikipedia.org/wiki/Determinant#Determinants_of_3-by-3_matrices

(Watch what you do with those minus signs.)

Good luck!
Forum: C++ Sep 15th, 2008
Replies: 11
Views: 1,005
Posted By Duoas
Re: replace ctrl M(^m) characters

I actually wrote a little program to do just that not too long ago:

strip-cr.cpp

#include <algorithm>
#include <functional>
#include <iostream>
#include <iterator>
using namespace std;
Forum: C++ Sep 15th, 2008
Replies: 3
Views: 587
Posted By Duoas
Re: Help with the Getch() fuction...

Almost exactly what I was going to say. Your professor is giving you a hard time for using getch()? I would be hard-pressed to find a modern 32-bit Windows compiler that doesn't support it. And only...
Forum: C++ Sep 14th, 2008
Replies: 1
Views: 453
Posted By Duoas
Re: List running processes

Use CreateToolhelp32Snapshot() (http://msdn.microsoft.com/en-us/library/ms682489(VS.85).aspx) with the TH32CS_SNAPPROCESS flag and Process32First() and Process32Next() to get a list of processes on...
Forum: C++ Sep 14th, 2008
Replies: 9
Views: 580
Posted By Duoas
Re: Huffman coding Issue

If you read and write your files one byte at a time, endianness is not an issue.

However, bit order is always an issue. The first bit you write should be in bit position 0 of the first byte you...
Forum: C++ Sep 14th, 2008
Replies: 9
Views: 580
Posted By Duoas
Re: Huffman coding Issue

You caught me just before I left...

It looks like the default char type is signed. So:

unsigned char 0xBF (default windows codepage for '¿', but any binary data will do)
read as --> signed char...
Forum: C++ Sep 14th, 2008
Replies: 27
Views: 25,029
Posted By Duoas
Re: get length of a dynamic array

> For slow-witted reanimators: it's impossible in C and C++ to get a size of array argument by this array parameter only.

Funny how there are all kinds of C and C++ libraries to do just that sort of...
Forum: Pascal and Delphi Sep 14th, 2008
Replies: 1
Views: 420
Posted By Duoas
Re: Algorithm help

What exactly do you mean by "columns"? The same as in your code?

If so, perhaps it would help to stare at the cute animation over at Wikipedia: Pascal's Triangle...
Forum: Pascal and Delphi Sep 14th, 2008
Replies: 6
Views: 830
Posted By Duoas
Re: Display a single unicode character?

Unfortunately, Delphi really doesn't have very good support for Unicode. Widestrings really only exist for compatabilty with OLE objects...

Lately I've been learning a lot about using Unicode in my...
Forum: C++ Sep 14th, 2008
Replies: 9
Views: 580
Posted By Duoas
Re: Huffman coding Issue

You've got waaaay too many variables swimming around in there.

That said, you've managed to do all your bit-shifting without collisions.


Big output
The reason why your output file is so big is...
Forum: C++ Sep 14th, 2008
Replies: 3
Views: 359
Posted By Duoas
Re: std::remove() syntax

If you plan to do any serious programming in C++ you absolutely must have a good reference (http://www.cplusplus.com/reference/clibrary/cstdio/remove.html).

How did you learn about the function to...
Forum: C++ Sep 13th, 2008
Replies: 5
Views: 263
Posted By Duoas
Re: just:

AD Check your PMs

For everyone else...

is it just a question?
or is it nothing at all?

maybe we can help
for just a little more info
Forum: C++ Sep 13th, 2008
Replies: 8
Views: 594
Posted By Duoas
Re: Preventing multiple instances of .exe

...which is the correct solution for Linux.

On Windows, register a new window message (specific to your application) and broadcast it when your program is considering starting up.

Any existing...
Forum: C++ Sep 13th, 2008
Replies: 5
Views: 263
Posted By Duoas
Re: just:

maybe:

:twisted: (Google "haskell maybe" if you are confused.)

/me runs away
Forum: C++ Sep 13th, 2008
Replies: 3
Views: 297
Posted By Duoas
Re: Bitwise operations doubt

Good grief, why the plethora of new threads?
Forum: C++ Sep 13th, 2008
Replies: 9
Views: 580
Posted By Duoas
Re: Huffman coding Issue

Hmm, I just replied to your last post...

Huffman only works if the tree is properly formed. If you are getting a larger output file then your tree is malformed.

You are accounting for the...
Showing results 1 to 40 of 500

 
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 11:39 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC