Forum: Java Nov 23rd, 2007 |
| Replies: 3 Views: 2,045 |
Forum: Java Nov 21st, 2007 |
| Replies: 3 Views: 2,045 It's not that I don't know how to write classes but how to use them.
I can have data classes for each table with setters and getters but when you run a SQL query you make the connection and... |
Forum: Java Nov 21st, 2007 |
| Replies: 3 Views: 2,045 I need some advice on the way I'm should be doing something like this...
My main GUI is composed of a JTable and query box for custom SQL user queries.
I execute a SQL query, from the ResultSet,... |
Forum: C++ Nov 5th, 2007 |
| Replies: 5 Views: 1,450 Thanks guys useful info, will put it to use after I read it couple of times...
cheers |
Forum: C++ Nov 4th, 2007 |
| Replies: 5 Views: 1,450 I've know that a pointer to some dynamic memory must be deleted to prevent memory leaks.
Now if say a struct/array or some other data structure, each with its own dynamic memory parts. If that... |
Forum: C++ Nov 4th, 2007 |
| Replies: 3 Views: 4,086 |
Forum: C++ Nov 4th, 2007 |
| Replies: 3 Views: 4,086 Is it safe to compare strings with == operator or is .compare recommended?
One of my teachers said NOT to use the == operator and always use a function when available. The example given was... |
Forum: C++ Nov 3rd, 2007 |
| Replies: 3 Views: 2,020 I have like 5 classes, 3 of then need around 15 constants the other 2 classes need only 2 of the 15.
I was thinking of having a header file to contain all the constants in header file and just... |
Forum: C++ Oct 29th, 2007 |
| Replies: 1 Views: 1,331 I found the strcpy(..) to copy over the const c string from .c_str()... so I've answed my question... |
Forum: C++ Oct 29th, 2007 |
| Replies: 1 Views: 1,331 string a = "hello";
char b[20];
Other than a for loop to copy character by character over is there some sort of function to convert strings to non const chars arrays? I don't even know if it... |
Forum: C++ Oct 26th, 2007 |
| Replies: 3 Views: 1,164 Other than pointer arithmetics or something I don't know anything else... but the memory thing was what I wanted to know...
cheers |
Forum: C++ Oct 26th, 2007 |
| Replies: 3 Views: 1,164 One function is pass by pointer which stores the reference, the other is just pass by a reference... are theses methods equvilent or does one method require more memory than the other?
#include... |
Forum: Java May 31st, 2007 |
| Replies: 1 Views: 4,741 I was wondering if it's possible to change or add values to enum types? Such as changing the string "This is a msg" or add additional value to the type test.
May I have some tips?
public... |
Forum: C++ May 20th, 2007 |
| Replies: 4 Views: 3,548 I see... just read about c-type strings vs c++ strings, now I know why my == didn't work with grabbing and comparing stuff of the commandline that uses char *argv[].
cheers |
Forum: C++ May 18th, 2007 |
| Replies: 4 Views: 3,548 I'm not quite sure the difference between strcmp and == operator when comparing 2 different strings, I was told to do this but == works as well with less typing.
if ((strcmp (a, b[i]) == 0)) ... |
Forum: Java May 7th, 2007 |
| Replies: 7 Views: 14,307 Doh! Ok, then, I'll just increase the size of the array. I was doing somethig similar to below, everything is done but I thought it would be neat idea to increase the array dynamically.
prompt... |
Forum: Java May 6th, 2007 |
| Replies: 7 Views: 14,307 I can't figure how to get this going, for every object I create I want to add that to the existing array. I read about arraycopy but I don't know how to increase the existing size of the array and... |
Forum: Java Apr 19th, 2007 |
| Replies: 2 Views: 1,812 import java.util.Scanner;
import java.util.InputMismatchException;
public class test
{
public static void main(String args[])
{
int a[] = new int[10];
int counter = 0;... |
Forum: Java Apr 19th, 2007 |
| Replies: 2 Views: 1,812 I would like to make so that when you have a int and prompting user to enter some number for calculations... if the number entered is larger than a 10digits, my program wouldn't just crash or if the... |
Forum: C++ Apr 13th, 2007 |
| Replies: 4 Views: 5,799 I see, so for those scientic calculators in C++ they use other libraries for better precisions instead of the standard one.
Got it, thanks. |
Forum: C++ Apr 13th, 2007 |
| Replies: 4 Views: 5,799 I compiled in cygwin so g++. I didn't mean anything wrong with setprecision() but discovered it while playing with it but why ain't the numbers precise? Isn't that very bad for scientific... |
Forum: C++ Apr 13th, 2007 |
| Replies: 4 Views: 5,799 Learning about all functions in <iomanip> and was testing out setprecision() and found that something weird is going on...? I did try to do a search on setprecision() limitatations or similar... |
Forum: C++ Mar 24th, 2007 |
| Replies: 10 Views: 1,785 istringstream convert(line);
convert >> num;
if (!convert)
What would be the pseudocode for the 3 lines above, well I want to understand it as well.
After some reading I found that... |
Forum: C++ Mar 24th, 2007 |
| Replies: 10 Views: 1,785 Thank you joeprogrammer (http://www.daniweb.com/techtalkforums/member73097.html)!
Mashed my keyboard... my little calcuation program didn't crash. Perfect!
I do have a few question about... |
Forum: C++ Mar 24th, 2007 |
| Replies: 10 Views: 1,785 That's what happens with my program, when you enter a string when cin type is int, it enters some infinity loop in my while loop. I get that part now, so how do I use the if..else to test for the... |
Forum: C++ Mar 24th, 2007 |
| Replies: 10 Views: 1,785 I'm making this calculator thing, my knowledge in c++ isn't very deep at all, I don't understand why you need to convert the int to string to test the int and see if it's a string or not? I'm... |
Forum: C++ Mar 24th, 2007 |
| Replies: 10 Views: 1,785 Ok, I new to this and haven't been taught exception handling yet but I would like my program to run without crashing when someone mashes the keyboard. I have declared an int x, and I don't want my... |