Showing results 1 to 40 of 321
Search took 0.02 seconds.
Posts Made By: Hamrick
Forum: C++ Sep 11th, 2007
Replies: 4
Views: 925
Posted By Hamrick
Re: Deciding return type of a function at runtime

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: 949
Posted By Hamrick
Re: accessing variable outside the loop

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: 2,534
Posted By Hamrick
Re: Do "Regulars" Hang Out On "Who's Online"?

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 be...
Forum: Geeks' Lounge Sep 9th, 2007
Replies: 17
Views: 2,490
Posted By Hamrick
Re: Best way to learn Java: use a full IDE or a Notepad?

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: 661
Posted By Hamrick
Re: Question on my constructor

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,140
Posted By Hamrick
Re: Borland C++ Builder 6 Errors

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,140
Posted By Hamrick
Re: Borland C++ Builder 6 Errors

robgxxx, you're replying to threads that are three years old...
Forum: C Sep 7th, 2007
Replies: 9
Views: 817
Posted By Hamrick
Re: Coding a SYN scanner guide

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: 817
Posted By Hamrick
Re: Coding a SYN scanner guide

That's better. Clicking 2 links more that I don't trust _was_ too much trouble.
Forum: C Sep 7th, 2007
Replies: 9
Views: 817
Posted By Hamrick
Re: Coding a SYN scanner guide

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: 817
Posted By Hamrick
Re: Coding a SYN scanner guide

Maybe nobody wants to download it...
Forum: VB.NET Sep 7th, 2007
Replies: 3
Views: 4,042
Posted By Hamrick
Re: KeyDown/Key Preview...

If that's how you feel, who am I to disagree?
Forum: Geeks' Lounge Sep 7th, 2007
Replies: 17
Views: 2,490
Posted By Hamrick
Re: Best way to learn Java: use a full IDE or a Notepad?

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: 4,042
Posted By Hamrick
Re: KeyDown/Key Preview...

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: 486
Posted By Hamrick
Re: void** syntax question

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: 1,660
Posted By Hamrick
Re: Line feeds in a Textbox

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,324
Posted By Hamrick
Re: passing arrays / updating object arrays

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: 2,534
Posted By Hamrick
Re: Do "Regulars" Hang Out On "Who's Online"?

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 be...
Forum: C++ Sep 6th, 2007
Replies: 2
Views: 1,619
Posted By Hamrick
Re: Declaring a list in a header file

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:

MergeSort();
Forum: Geeks' Lounge Sep 6th, 2007
Replies: 41
Views: 2,870
Posted By Hamrick
Re: New Ipod line. Which one are you?

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...
Forum: C++ Sep 6th, 2007
Replies: 10
Views: 1,114
Posted By Hamrick
Re: Pls Help

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: 610
Posted By Hamrick
Re: Briefly explain what you think the overall purpose of this function is (do not de

If _you_ don't solve the question, what do you expect to learn? :(
Forum: C++ Sep 6th, 2007
Replies: 4
Views: 1,553
Posted By Hamrick
Re: Random Binary number

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; i < 10;...
Forum: C++ Sep 6th, 2007
Replies: 10
Views: 1,114
Posted By Hamrick
Re: Pls Help

http://www.daniweb.com/forums/announcement8-2.html
Forum: C++ Sep 6th, 2007
Replies: 10
Views: 1,114
Posted By Hamrick
Re: Pls Help

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: 1,553
Posted By Hamrick
Re: Random Binary number

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: 2,534
Posted By Hamrick
Re: Do "Regulars" Hang Out On "Who's Online"?

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...
Forum: C++ Sep 6th, 2007
Replies: 38
Views: 2,324
Posted By Hamrick
Re: passing arrays / updating object arrays

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 Pizza::set...
Forum: DaniWeb Community Feedback Sep 6th, 2007
Replies: 26
Views: 2,534
Posted By Hamrick
Re: Do "Regulars" Hang Out On "Who's Online"?

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: 4,921
Posted By Hamrick
Re: C/C++ Code Syntax Highlighting

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: 2,870
Posted By Hamrick
Re: New Ipod line. Which one are you?

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: 560
Posted By Hamrick
Re: leaves and nodes mathematical expression

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,077
Posted By Hamrick
Re: Read a binary file

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: 2,857
Posted By Hamrick
Re: how to call C# method in C++

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: 2,574
Posted By Hamrick
Re: Cancel Button

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 EventArgs...
Forum: C Sep 5th, 2007
Replies: 6
Views: 925
Posted By Hamrick
Re: Is this program valid???if yes then tell how?

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: 925
Posted By Hamrick
Re: Is this program valid???if yes then tell how?

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 dummy(...
Forum: C++ Sep 5th, 2007
Replies: 33
Views: 3,077
Posted By Hamrick
Re: Read a binary file

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,077
Posted By Hamrick
Re: Read a binary file

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,077
Posted By Hamrick
Re: Read a binary file

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...
Showing results 1 to 40 of 321

 
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 11:50 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