Forum: C++ Sep 11th, 2007 |
| Replies: 4 Views: 1,393 I think this might work.
#include <iostream>
using namespace std;
class Class1 { };
class Class2 { };
// Specialize two type traits for picking class 1 and class 2. |
Forum: C Sep 10th, 2007 |
| Replies: 9 Views: 1,530 You can only access an object if it was declared in the same scope or an enclosing scope. That's the techno babble explanation. :) What it means is that if you declare something inside a loop, you... |
Forum: DaniWeb Community Feedback Sep 9th, 2007 |
| Replies: 26 Views: 3,270 I guess if you filter the who's online list to only show members, that's a moot point.
I think Dave's point is that that's reactive. Watching what everyone is doing and how it relates to you can... |
Forum: Geeks' Lounge Sep 9th, 2007 |
| Replies: 17 Views: 3,646 I don't think using all of the tools available means you're weak. Programming is hard enough as it is, so why not get all the help you can? :) |
Forum: C++ Sep 8th, 2007 |
| Replies: 4 Views: 963 Only if you use the default constructor when making objects. If you do Object obj; then Object has to have a default constructor, but if you do Object obj( arg ); then Object only has to have a... |
Forum: C++ Sep 8th, 2007 |
| Replies: 12 Views: 4,960 I guess because more than just the original poster can benefit from threads. Do you think that useful info should be deleted after a certain amount of time? That doesn't make sense to me. |
Forum: C++ Sep 8th, 2007 |
| Replies: 12 Views: 4,960 robgxxx, you're replying to threads that are three years old... |
Forum: C Sep 7th, 2007 |
| Replies: 9 Views: 1,225 If I'm not comfortable using it, I won't. Simple. You don't need to understand my concern to respect it. :)
The file looks well written, but it'll take me a while to understand it. |
Forum: C Sep 7th, 2007 |
| Replies: 9 Views: 1,225 That's better. Clicking 2 links more that I don't trust _was_ too much trouble. |
Forum: C Sep 7th, 2007 |
| Replies: 9 Views: 1,225 Yeah. rapidshare looks kind of sketchy and I don't want to click any of those links to download your file. :) |
Forum: C Sep 7th, 2007 |
| Replies: 9 Views: 1,225 Maybe nobody wants to download it... |
Forum: VB.NET Sep 7th, 2007 |
| Replies: 3 Views: 6,669 If that's how you feel, who am I to disagree? |
Forum: Geeks' Lounge Sep 7th, 2007 |
| Replies: 17 Views: 3,646 I've heard that it's better to learn how to use the compiler from the command prompt first, then use an IDE to be more productive. I say do whatever makes you more comfortable. :) |
Forum: VB.NET Sep 7th, 2007 |
| Replies: 3 Views: 6,669 It's not a lie, but you might be confused about when and how a control captures key strokes. I think you want a global winndows hook (http://www.codeproject.com/useritems/WindowsHookLib.asp). Here's... |
Forum: C++ Sep 7th, 2007 |
| Replies: 2 Views: 711 I think you have to do something like this because int** isn't a compatible type with void**.
int i = 123;
int *p = &i;
void pop( void **data ) {
*data = p;
}
int main() { |
Forum: C# Sep 7th, 2007 |
| Replies: 2 Views: 2,541 Use either Environment.NewLine or "\r\n". Environment.NewLine is more portable, but that's not a big problem with .net programs. ;) |
Forum: C++ Sep 6th, 2007 |
| Replies: 38 Views: 2,999 You have to be careful here. 'By reference' could mean two things, and only one of them is right. ;) Thef irst by reference is an actual reference in C++ and arrays are not passed by that reference... |
Forum: DaniWeb Community Feedback Sep 6th, 2007 |
| Replies: 26 Views: 3,270 That's really sophistimicated compared to how I use it. :D I guess I need a few thousand more posts to figure out all of the cool features of the forum.
Speed-posting the best answer... It must... |
Forum: C++ Sep 6th, 2007 |
| Replies: 2 Views: 3,249 C++ is case sensitive. Change it to list instead of List and if you don't do using namespace std; you have to prefix the name with std.
#include<list>
class MergeSort{
public:
... |
Forum: Geeks' Lounge Sep 6th, 2007 |
| Replies: 41 Views: 3,766 I'm not an audiophile, so I can't tell a difference. :D
Microsoft really isn't any better, but I guess if you don't have a majority of the market share, you can't be called for anti-trust...
... |
Forum: C++ Sep 6th, 2007 |
| Replies: 10 Views: 1,471 You're not solving anything by asking someone else do to it. And you're not learning anything either. _And_ you're spamming. |
Forum: C++ Sep 6th, 2007 |
| Replies: 3 Views: 922 If _you_ don't solve the question, what do you expect to learn? :( |
Forum: C++ Sep 6th, 2007 |
| Replies: 4 Views: 2,546 The bitset class lets you work with bits, and you can easily print them too.
#include <bitset>
#include <cstdlib>
#include <iostream>
using namespace std;
int main() {
for ( int i = 0;... |
Forum: C++ Sep 6th, 2007 |
| Replies: 10 Views: 1,471 http://www.daniweb.com/forums/announcement8-2.html |
Forum: C++ Sep 6th, 2007 |
| Replies: 10 Views: 1,471 Stop spamming with the same thing, please. All of your questions are pretty much impossible to answer as given, and it seems like you're trying to get free homework help. |
Forum: C++ Sep 6th, 2007 |
| Replies: 4 Views: 2,546 All numbers are stored in binary. Do you mean generate a random number and then save the binary conversion as a string? |
Forum: DaniWeb Community Feedback Sep 6th, 2007 |
| Replies: 26 Views: 3,270 I like the real time aspect of who's online. The list of recent posts in my subscribed forums doesn't show me who's replying or creating a thread right now, it only shows me who's already posted.
... |
Forum: C++ Sep 6th, 2007 |
| Replies: 38 Views: 2,999 toppings[z] = a[z] ;
If a is declared as a plain int, why are you subscripting it like an array of int? I think you should make the whole thing an array and that'll fix your problem.
void... |
Forum: DaniWeb Community Feedback Sep 6th, 2007 |
| Replies: 26 Views: 3,270 I use it to see who's posting to threads I started or posted to or who's making new threads. |
Forum: DaniWeb Community Feedback Sep 6th, 2007 |
| Replies: 17 Views: 6,043 Do all of those languages have syntax highlighting? The vbnet highlighting doesn't really work. Most of the keywords aren't highlighted at all... |
Forum: Geeks' Lounge Sep 6th, 2007 |
| Replies: 41 Views: 3,766 Can you post some links to those lots of music players that are so much better? :)
I want the ipod touch, but it's not practical yet. For less than a 16gb ipod touch, i could get a 160gb ipod... |
Forum: C++ Sep 6th, 2007 |
| Replies: 1 Views: 786 Any user input has to be validated first. Once you read the string you need to go over it and make sure that all of the parentheses are matched the right way and all of the operators have the right... |
Forum: C++ Sep 6th, 2007 |
| Replies: 33 Views: 3,917 Yeah, but I think you have enough info and code from everyone in this thread to help you write more of your program. It's starting to seem like you're asking us to write it for you. |
Forum: C# Sep 6th, 2007 |
| Replies: 1 Views: 5,380 If the C++ program is C++/CLI, you can add the C# dll as a reference in the C++ project and use it normally. If it's native C++, it's a little harder... |
Forum: VB.NET Sep 6th, 2007 |
| Replies: 3 Views: 5,333 Get the user's choice from a message box and only set the dialog's DialogResult property to true if they click 'yes'. :)
Private Sub ButtonCancel_Click( ByVal sender As Object, ByVal e As... |
Forum: C Sep 5th, 2007 |
| Replies: 6 Views: 1,234 Yeah, I know. You should read my post again, and the post above it, more slowly this time. ;) |
Forum: C Sep 5th, 2007 |
| Replies: 6 Views: 1,234 If printf didn't return a value, it would return void. There aren't any values of void type, so something like this shouldn't ever compile. That means it's not valid.
#include <stdio.h>
void... |
Forum: C++ Sep 5th, 2007 |
| Replies: 33 Views: 3,917 I can't, but my teachers like to say that if you don't do something right the first time, you end up doing it again and again to fix the problems. It seems to me that using an array is bad because... |
Forum: C++ Sep 5th, 2007 |
| Replies: 33 Views: 3,917 Because the quick and easy way is usually more costly in the long run? :D
You don't have to read it one byte at a time if that's what you're worried about.
// Get the binary data
char... |
Forum: C++ Sep 5th, 2007 |
| Replies: 33 Views: 3,917 How does that make a difference? A string just handles the memory for the char array instead of making you do it. I don't think there should be any problem with using a string as long as you don't do... |