Forum: C++ 6 Hours Ago |
| Replies: 8 Views: 153 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 |
Forum: C++ 10 Hours Ago |
| Replies: 3 Views: 70 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 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 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 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 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 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 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 |
Forum: C 1 Day Ago |
| Replies: 9 Views: 110 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 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 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 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 |
Forum: C++ 6 Days Ago |
| Replies: 6 Views: 152 |
Forum: C++ 6 Days Ago |
| Replies: 7 Views: 215 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 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 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 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 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 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 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 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 |
Forum: C++ 12 Days Ago |
| Replies: 9 Views: 460 |
Forum: C++ 12 Days Ago |
| Replies: 4 Views: 149 |
Forum: Pascal and Delphi 12 Days Ago |
| Replies: 1 Views: 383 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 |
Forum: C++ 12 Days Ago |
| Replies: 2 Views: 127 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 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 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 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 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 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 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 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 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 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 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... |