Search Results

Showing results 1 to 40 of 61
Search took 0.01 seconds.
Search: Posts Made By: Hamrick
Forum: C Sep 10th, 2007
Replies: 9
Views: 1,602
Posted By Hamrick
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: C++ Sep 7th, 2007
Replies: 2
Views: 732
Posted By Hamrick
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 6th, 2007
Replies: 38
Views: 3,073
Posted By Hamrick
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: C++ Sep 6th, 2007
Replies: 38
Views: 3,073
Posted By Hamrick
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: VB.NET Sep 5th, 2007
Replies: 2
Views: 1,827
Posted By Hamrick
Yes, there is! :) What you need to do is access the controls through a dummy interface that calls Invoke on the control instead of manipulating it directly if it's not on the main thread.

Delegate...
Forum: VB.NET Sep 4th, 2007
Replies: 5
Views: 3,576
Posted By Hamrick
I don't think they make sense for the date time picker. There's probably a few ways you can define them for the control, but I can't think of any that make a date time picker the better choice than a...
Forum: VB.NET Sep 4th, 2007
Replies: 5
Views: 3,576
Posted By Hamrick
Did you try databinding?

DateTimePicker1.DataBindings.Add( "Value", MasterTable, "Dates" )

I don't think that'll work very well though. If you pick a date that isn't in the table, you'll...
Forum: VB.NET Sep 4th, 2007
Replies: 6
Views: 3,315
Posted By Hamrick
The data source part of the connection string refers to an mdb file, not a folder path. I think it should be like this.

Dim DBSPATH As String = "C:\Documents and Settings\rgibson.FOODGROUP\My...
Forum: C Sep 4th, 2007
Replies: 7
Views: 1,245
Posted By Hamrick
You write a C callable wrapper that runs the method.

#include <cstring>
#include <sstream>
#include <string>
#include <vector>

using namespace std;

class Split {
Forum: VB.NET Sep 4th, 2007
Replies: 6
Views: 3,315
Posted By Hamrick
That's usually an error you get with malformed connection strings for ado.net. You mentioned access, are you trying to connect to the database at all? If you are, what does the connection string look...
Forum: VB.NET Sep 3rd, 2007
Replies: 6
Views: 3,315
Posted By Hamrick
What are you doing in the form_Load event or constructor?
Forum: C Aug 31st, 2007
Replies: 8
Views: 1,197
Posted By Hamrick
I don't know. It looks like CreateRawDataBUFR is corrupting your object, but you didn't post the logic for CreateRawDataBUFR. Without the code I can't even guess where you went wrong.
Forum: C++ Aug 30th, 2007
Replies: 5
Views: 883
Posted By Hamrick
I hope you're not surprised that intel's compiler has better optimizations because they _make_ the processors, and not because you just don't like microsoft. ;)
Forum: VB.NET Aug 30th, 2007
Replies: 3
Views: 1,113
Posted By Hamrick
I'm not sure what you mean, but you can write a unit test method that runs the event handlers for each of the buttons as if you clicked on them. That automates a sequence of button clicks...
Forum: C Aug 29th, 2007
Replies: 17
Solved: Stupid Question
Views: 2,271
Posted By Hamrick
system is in stdlib.h, not stdio.h. It's not a good idea either because now you depend on an outside program that might be malicious. It's a big security no-no because you created a hole that hackers...
Forum: C Aug 29th, 2007
Replies: 17
Solved: Stupid Question
Views: 2,271
Posted By Hamrick
Doesn't printing \n do the same thing as fflush?
Forum: C Aug 28th, 2007
Replies: 17
Solved: Stupid Question
Views: 2,271
Posted By Hamrick
The window gets destroyed when the program ends. If you call getchar so that it blocks for input, the program doesn't end and the window isn't destroyed until getchar returns.
Forum: VB.NET Aug 27th, 2007
Replies: 9
Views: 2,347
Posted By Hamrick
Put it somewhere else without all of the extra nesting, like C:\. Make sure that the extension is right. If this is access, it should be *.mdb, not *.mdp, I think. When it tells you it can't find the...
Forum: VB.NET Aug 27th, 2007
Replies: 9
Views: 2,347
Posted By Hamrick
What message does the exception give you?
Forum: VB.NET Aug 27th, 2007
Replies: 9
Views: 2,347
Posted By Hamrick
System.Xml and System.Xml.dll are the same thing in the reference picker. But that reference should have been added when you made a windows forms project...
Forum: VB.NET Aug 24th, 2007
Replies: 9
Views: 2,347
Posted By Hamrick
You don't need to surround the database path in quotes inside a connection string. The key/value pairs are all delimited. It should look like this instead.

con.ConnectionString =...
Forum: VB.NET Aug 23rd, 2007
Replies: 4
Solved: system tray
Views: 5,155
Posted By Hamrick
That's what the link is for. :) Here's a super short program that does it.

Public Class MainForm
Inherits System.Windows.Forms.Form

Private _trayIcon As System.Windows.Forms.NotifyIcon

...
Forum: VB.NET Aug 22nd, 2007
Replies: 2
Solved: bar dissapear
Views: 644
Posted By Hamrick
You can set the FormBorderStyle to None and that removes the border and toolbar completely. Is that what you wanted?
Forum: VB.NET Aug 22nd, 2007
Replies: 4
Solved: system tray
Views: 5,155
Posted By Hamrick
Add a NotifyIcon (http://www.codeproject.com/csharp/trayiconmenu01.asp) to your project that's only visible when the main form's window state is minimized.
Forum: C++ Aug 22nd, 2007
Replies: 6
Views: 2,949
Posted By Hamrick
I ran your code, Bench, but it doesn't do what gaggu82 asked for. It finds the search string even if it's embedded in another word, like "this is a string" prints "is is a string" instead of "is a...
Forum: C++ Aug 22nd, 2007
Replies: 6
Views: 2,949
Posted By Hamrick
There might be a way in the STL to do it, but I don't know. I'd write a search function that finds every occurrence of "is" and then checks to see if the first and last letters are on a word...
Forum: C Aug 21st, 2007
Replies: 11
Views: 1,783
Posted By Hamrick
All of the memory for the stack is preallocated. The OS allocates it when the program starts and frees it when the program ends, but while the program is running, it's all still there. Going in and...
Forum: C Aug 21st, 2007
Replies: 11
Views: 1,783
Posted By Hamrick
No, it doesn't. But you _do_ lose the only reference to the space you had, and that's called a memory leak because now it's allocated and won't be freed until the program ends. If your OS doesn't...
Forum: C++ Aug 20th, 2007
Replies: 13
Views: 1,809
Posted By Hamrick
I don't know much about boost.pool, but unless it does all of the work for you then you will have to implement your own allocator.


If you need to override the default destructor, it's not...
Forum: C++ Aug 20th, 2007
Replies: 13
Views: 1,809
Posted By Hamrick
You can handle memory by storing it all in one big block and passing out chunks just big enough for each node. Then freeing it turns into just one call to delete. But that doesn't call destructors...
Forum: C++ Aug 20th, 2007
Replies: 13
Views: 1,809
Posted By Hamrick
What do you mean by making the data structure heavier? You have to free the memory and to free the memory you have to visit every node. The only heavy thing about the clean function is that it uses...
Forum: VB.NET Aug 17th, 2007
Replies: 2
Views: 1,505
Posted By Hamrick
Use the Thread.Sleep() method.

System.Threading.Thread.Sleep( 100 )
Forum: VB.NET Aug 17th, 2007
Replies: 2
Views: 2,476
Posted By Hamrick
You can use the ToString() method of the value and it will turn DBNull into an empty string.

T7.Text = tmp.Fields("Street").Value.ToString()

Or you can test for DBNull and just not set the text...
Forum: IT Professionals' Lounge Aug 16th, 2007
Replies: 21
Solved: Random question
Views: 3,297
Posted By Hamrick
GUIs in C++ aren't really that easy unless you use C++.NET and then you could use C# because it's designed with .NET in mind while C++.NET is a patch job. Visual C# 2005 Express is a free compiler...
Forum: C++ Aug 16th, 2007
Replies: 9
Views: 1,906
Posted By Hamrick
I think you'd be better off trying to separate the common stuff that both apps use into a dll and then having both apps reference the dll. What exactly do you need to do this for anyway?
Forum: IT Professionals' Lounge Aug 15th, 2007
Replies: 21
Solved: Random question
Views: 3,297
Posted By Hamrick
What language do you need the compiler for? :)
Forum: C++ Aug 15th, 2007
Replies: 5
Views: 1,378
Posted By Hamrick
That's the same thing I suggested except it's too specific to the problem. If this is homework then a good next project is to generalize the problem into a number of any length or to change the...
Forum: IT Professionals' Lounge Aug 15th, 2007
Replies: 21
Solved: Random question
Views: 3,297
Posted By Hamrick
I just finished an app that lets you open a data connection and test stored procedures by using an XML config file to specify the stored procedures and corresponding parameter information. If I...
Forum: C++ Aug 15th, 2007
Replies: 5
Views: 1,378
Posted By Hamrick
Ok, here are a few hints that you can bring together to do the program.

1: You can find the right side (least significant) digit for a number in any base by saying number % base. If the number is...
Forum: Java Aug 13th, 2007
Replies: 7
Views: 1,543
Posted By Hamrick
It says line 300. That's probably right where the offending catch is and you can look back up to find the matching try. I'd help, but I don't have a way of matching the error's line 300 to the line...
Showing results 1 to 40 of 61

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC