User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
DaniWeb is a massive community of 370,576 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 1,943 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Showing results 1 to 40 of 500
Search took 0.07 seconds.
Posts Made By: Duoas
Forum: C++ 6 Hours Ago
Replies: 8
Views: 153
Posted By Duoas
Re: Opening an .exe file with C++

For the OP, the security danger is in executing less-privileged programs with more-privileged programs. That is, a low-level hax0r can write malicious code and get someone with access rights he...
Forum: C++ 10 Hours Ago
Replies: 3
Views: 62
Posted By Duoas
Re: trouble using fstream with arrays

Heh, don't feel bad. Nothing is obvious until you see it. You'll do fine.
:)
Forum: C++ 10 Hours Ago
Replies: 3
Views: 70
Posted By Duoas
Re: Constructor question

Just a quick glance it looks OK.

The insertion operator prototype should list its second argument as const:
ostream& operator << (ostream& out, const Contributor& InContributor)

What makes one...
Forum: C 10 Hours Ago
Replies: 9
Views: 110
Posted By Duoas
Re: Fifo error

Salem is right. I almost said something about that myself but it has been a while since I've used select() and I forgot you aren't waiting on stdin (even though your comments say you are).

To wait...
Forum: C++ 10 Hours Ago
Replies: 8
Views: 153
Posted By Duoas
Re: Opening an .exe file with C++

There is nothing inherently evil about system(), or executing other executables; just be aware that you must be careful how you do it.
Forum: C++ 10 Hours Ago
Replies: 2
Views: 50
Posted By Duoas
Re: C++ and VBA

They will remain separate programs, but I think you are asking if your C++ program can automatically run the VBA program so that the user doesn't have to?

You have a variety of options. You can use...
Forum: C++ 10 Hours Ago
Replies: 3
Views: 70
Posted By Duoas
Re: Constructor question

"Overloading" (at least in C++) means that you have more than one function with the same name. In this case, you have three different constructors, but they all have the same name.

The difference is...
Forum: C++ 10 Hours Ago
Replies: 3
Views: 62
Posted By Duoas
Re: trouble using fstream with arrays

You need to rethink why you are using a loop.
Ideally, if you have to do things multiple times, it suggests a loop and/or an array.

Since you need to remember five numbers, instead of writing:
int...
Forum: C++ 10 Hours Ago
Replies: 1
Views: 53
Posted By Duoas
Re: TXT File Loading Prog

The only two things I see that are guaranteed problems are first in EnterName(). You should input text using getline().

void WordRead::EnterName()
{
cout << "Type in the text file path you wish to...
Forum: C++ 1 Day Ago
Replies: 3
Views: 55
Posted By Duoas
Re: MFC-how the heck do you get it?!?!?

If you are using the Express edition, you can't.
If you purchased VS, then call the MS support and ask.
Sorry.
Forum: C 1 Day Ago
Replies: 9
Views: 110
Posted By Duoas
Re: Fifo error

The FIFO will never have input until you write something to it. Since you don't write anything to it, select() will always say that there is no input waiting.

Remember, a FIFO must be open at both...
Forum: C++ 1 Day Ago
Replies: 3
Views: 68
Posted By Duoas
Re: Weird Compression

You have discounted newline conversions.

On Windows, the newline character represents the ASCII sequence CR LF.
When your program reads it, it gets '\n'. The newline is encrypted thus and so the...
Forum: C++ 2 Days Ago
Replies: 2
Views: 86
Posted By Duoas
Re: Template<class T> to partially fill array

Ah, I see the problem.

On line 52 you are assuming something about the input with (next >= 0). (According to the instructions it should be (next > 0).)

If you wish to use a semaphore item to...
Forum: C++ 5 Days Ago
Replies: 7
Views: 215
Posted By Duoas
Re: RESTARTING A laptop

You still haven't indicated what OS you are using, but doesn't it do that for you anyway? On each one of Windows, Mac, and Linux you can set yourself a secure password and disable all other user...
Forum: C++ 6 Days Ago
Replies: 6
Views: 152
Posted By Duoas
Re: getting character input with one keystroke

You may already have NCurses installed.

Try the following program to see if you do.

// hello.cpp

#include <curses.h>

int main() {
initscr();
Forum: C++ 6 Days Ago
Replies: 6
Views: 152
Posted By Duoas
Re: getting character input with one keystroke

Like iamthwee indicated, there is no standard way to do that. You'll have to do something OS-specific.

I suggest you check out the Curses library.

POSIX: NCurses...
Forum: C++ 6 Days Ago
Replies: 7
Views: 215
Posted By Duoas
Re: RESTARTING A laptop

Win32 (http://www.codeguru.com/cpp/w-p/win32/tutorials/article.php/c8647/)
Linux (http://linux.die.net/man/2/reboot)
Mac OS X (http://developer.apple.com/qa/qa2001/qa1134.html)

Hope this helps.
Forum: C++ 6 Days Ago
Replies: 6
Views: 180
Posted By Duoas
Re: graphics

Please don't shout.

Adding a background depends on the toolkit you are using.

If you are using straight Win32 API, you'll need to process the WM_PAINT message sent to the form and draw the bitmap...
Forum: Assembly 7 Days Ago
Replies: 4
Views: 161
Posted By Duoas
Re: Teach me variables

I understood what you want. Perhaps you should spend some more time reading through the theory links I gave you.

Variables have to exist somewhere, and the place for local variables is on the stack...
Forum: Assembly 7 Days Ago
Replies: 4
Views: 161
Posted By Duoas
Re: Teach me variables

Some theory (http://en.wikipedia.org/wiki/Call_stack).
More theory with concrete examples (http://www.unixwiz.net/techtips/win32-callconv-asm.html).
Some actual assembly examples...
Forum: C 8 Days Ago
Replies: 4
Views: 173
Posted By Duoas
Re: Problem with strings

I think you need to spend some time tracing through your algorithm. I'm not sure exactly what it is supposed to do, but I don't think it is doing what you want it to do...
(Given "HELLO", the list it...
Forum: C++ 9 Days Ago
Replies: 3
Views: 154
Posted By Duoas
Re: STl algorithm on two ranges

#include <algorithm>
#include <functional>
...

transform(
a.begin(),
a.end(),
b.begin(),
result.begin(),
minus <pair <foo, bar> > ()
Forum: Assembly 11 Days Ago
Replies: 4
Views: 670
Posted By Duoas
Re: lc3 assembles code to sort an array to stack

> I wasn't asking you to do my homework...

Yes, actually, you did:
> I am looking for assembler language in lc3 to sort an array...

If you wanted help developing an algorithm, you would have asked...
Forum: Pascal and Delphi 11 Days Ago
Replies: 5
Views: 299
Posted By Duoas
Re: Delphi SetLength dilemma

No exception because after SetLength(0) the variable is already nil, and FreeMem has a built-in safeguard against freeing nil pointers.
Forum: C++ 12 Days Ago
Replies: 9
Views: 460
Posted By Duoas
Re: error C2446: '==' : no conversion from 'int' to 'char *'

I know what you mean. When I was first learning C I spent three or four days once trying to figure out an error -- which turned out to be a missing } in an #included file...

An extra pair of eyes if...
Forum: C++ 12 Days Ago
Replies: 9
Views: 460
Posted By Duoas
Re: error C2446: '==' : no conversion from 'int' to 'char *'

Ah, it is because seating is declared as a 2D array, but you are only indexing one dimension. Hence the error.

Did you mean to treat seating as a 1D array in your function? I'm not sure how you are...
Forum: C++ 12 Days Ago
Replies: 4
Views: 149
Posted By Duoas
Forum: Pascal and Delphi 12 Days Ago
Replies: 1
Views: 383
Posted By Duoas
Re: Development inputs

You'll have to google for each of these.

The grid classes have methods to insert and delete rows.

To display things other than text you'll need to set the DefaultDrawing property to false and...
Forum: C++ 12 Days Ago
Replies: 9
Views: 460
Posted By Duoas
Re: error C2446: '==' : no conversion from 'int' to 'char *'

The compiler believes that seating is an integer. The OP placed the cast there to try to get rid of the error message.

Can we see the class definition where seating is declared? Is there anything...
Forum: C++ 12 Days Ago
Replies: 2
Views: 127
Posted By Duoas
Re: i++ vs. ++i?

C++FAQ-Lite 13.15 (http://www.parashift.com/c++-faq-lite/operator-overloading.html#faq-13.15)

Hope this helps.
Forum: C++ 12 Days Ago
Replies: 4
Views: 149
Posted By Duoas
Re: Default copy constructor

I don't know how you got that far...

You never initialize coeffs. You must set its length before playing with any elements. Or push elts onto the end.

Hope this helps.
Forum: C++ 12 Days Ago
Replies: 7
Views: 192
Posted By Duoas
Re: Type initialization

In C and C++, nothing is automatically initialized. (I'm pretty sure.)

You can use the STL fill_n() function to initialize it for you:

#include <algorithm> // fill_n() and copy()
#include...
Forum: C++ 12 Days Ago
Replies: 1
Views: 89
Posted By Duoas
Re: dialog help

In the combo box 'select item' event handler, use ShellExecute (http://msdn.microsoft.com/en-us/library/bb762153(VS.85).aspx)() to start VLC with the name of the file to play as argument.

You can...
Forum: Pascal and Delphi 13 Days Ago
Replies: 5
Views: 299
Posted By Duoas
Re: Delphi SetLength dilemma

No. That will cause a system exception.

You have very little control over exactly how much memory is used by your application. I believe there are compiler directives to specify the maximum heap...
Forum: C++ 13 Days Ago
Replies: 1
Views: 106
Posted By Duoas
Re: desktop icons

Do you mean that when you use the IDE to assign the icon to your application that the resulting EXE's icon is missing its transparency?

It could be that the IDE is too old to handle alpha...
Forum: C++ 13 Days Ago
Replies: 37
Views: 756
Posted By Duoas
Re: Arrays and Bitwise

We're glad to have been helpful (if indeed you found the thread enlightening...)

@dougy83
You are correct about how XOR works. You must have knowledge not encoded in the number to untangle it.

And...
Forum: Pascal and Delphi 13 Days Ago
Replies: 5
Views: 299
Posted By Duoas
Re: Delphi SetLength dilemma

All objects in Delphi, including 'string', are allocated on the heap. When you resize a dynamic array the unused objects are automatically destructed for built-in types only -- so in this case,...
Forum: C++ 14 Days Ago
Replies: 37
Views: 756
Posted By Duoas
Re: Arrays and Bitwise

Listen, don't get all hot under the collar. I have not said anything offensive to you.

numbers

Show me a "two".

You can show me two of something, but two, by itself, does not exist. It is an...
Forum: C++ 14 Days Ago
Replies: 37
Views: 756
Posted By Duoas
Re: Arrays and Bitwise

> This is making a (sorted) copy ... of the array

Yes, that is correct. The same is true of the XOR method. The problem cannot be solved unless you are permitted to have state. That is a fundamental...
Forum: C++ 14 Days Ago
Replies: 37
Views: 756
Posted By Duoas
Re: Arrays and Bitwise

Well, you can get all the original numbers back, including all duplicates, triplicates, etc, but you cannot get the original order of the elements back. So:

Yes: if element order is not...
Showing results 1 to 40 of 500

 
All times are GMT -4. The time now is 5:17 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC