Search Results

Showing results 1 to 34 of 34
Search took 0.01 seconds.
Search: Posts Made By: chiwawa10
Forum: C++ 3 Days Ago
Replies: 6
Views: 195
Posted By chiwawa10
If you want to keep track of the visited coordinates, you will need to keep a 2D array of a map for flagging. Mark each position once you have visited that spot. Please bear in mind that you may...
Forum: C++ Aug 18th, 2009
Replies: 1
Views: 209
Posted By chiwawa10
Lookup for the function setWindowTitle()
Forum: C++ Aug 7th, 2009
Replies: 7
Views: 366
Posted By chiwawa10
If you do not explicitly define a constructor for your class, the program will call the default constructor. This is not recommended as your variables will contain random value. Constructor and...
Forum: C++ Aug 7th, 2009
Replies: 16
Views: 430
Posted By chiwawa10
hey FirstPerson, where did you found the algorithm? Is it proven and works on any other number?


Regards,
Nick
Forum: C++ Aug 7th, 2009
Replies: 6
Views: 309
Posted By chiwawa10
Agree with MosaicFuneral, it is recommended to use ShellExecute() if you're in Windows.
Forum: C++ Aug 5th, 2009
Replies: 23
Views: 633
Posted By chiwawa10
Here is a simple idea.

1. Arrange your strings in the text file so that the program can easy parse the strings into questions and options (e.g. separate them by line)

2. Define struct to store...
Forum: C++ Aug 5th, 2009
Replies: 10
Views: 463
Posted By chiwawa10
When working with std::string only, I recommend to use the equal sign to copy one string to another. Usually I would use strcpy only when I'm caught in a situation dealing with char array and...
Forum: C++ Aug 5th, 2009
Replies: 7
Views: 347
Posted By chiwawa10
Hi Narue,

I tried debugging the codes and found that p actually points to the array 'a'. I tried successfully accessing the last element of array 'a' using pointer p. Therefore, I conclude that p...
Forum: C++ Aug 5th, 2009
Replies: 7
Views: 347
Posted By chiwawa10
Hi invisi,

The problem is obvious. Do remember this rule. Use delete when you have use a "new". In your case, you did not "new" a variable. You are merely assigning the pointer to another...
Forum: JavaScript / DHTML / AJAX Jul 20th, 2009
Replies: 1
Views: 546
Posted By chiwawa10
Hi all,

I am having trouble trying to load contents on a tab in accordion on the fly. Which means, the content for a particular tab will only be loaded and displayed when user click on it. Is...
Forum: C++ Sep 8th, 2008
Replies: 8
Views: 1,636
Posted By chiwawa10
thank you for all your feedback. Finally, I'm able to resolve the problem. Its a memory corruption problem. All I can say is, be careful when choosing between "wmemset" and "memset".
Forum: C++ Aug 19th, 2008
Replies: 8
Views: 1,636
Posted By chiwawa10
Hi mitrmkar,

I've attached the error message in this post. I've done a search through the Internet and found this this is quite a common case. However, there isn't much clue as to how to fix it...
Forum: C++ Aug 19th, 2008
Replies: 8
Views: 1,636
Posted By chiwawa10
Thank you for the info, Edward. Here's more information.

The application calls a function in a DLL (which was written by me). When the debug's DLL is used, the application does not crash when...
Forum: C++ Aug 17th, 2008
Replies: 8
Views: 1,636
Posted By chiwawa10
Hi all,

I have a piece of program written in Visual C++ which works just fine in Win XP. However when its run in Vista, the error message "A problem caused the program to stop working correctly....
Forum: JavaScript / DHTML / AJAX Apr 17th, 2008
Replies: 5
Views: 21,377
Posted By chiwawa10
It seems that I can run the .js file from Windows. Just double click it.
Forum: C++ Apr 14th, 2008
Replies: 6
Views: 432
Posted By chiwawa10
another alternative which I personally feels is better than Dev-C++ is CodeBlocks. Dev-C++ IDE has not been updated for too long.
Forum: C++ Apr 12th, 2008
Replies: 8
Views: 773
Posted By chiwawa10
You can use dynamic memory allocation. Learn that stuff because its good for you. There are two types of dynamic memory allocation.
1. malloc
2. new

*pls correct me if I'm wrong
Forum: C++ Apr 7th, 2008
Replies: 2
Views: 999
Posted By chiwawa10
For your information, the escape character in C++ is the backslash. Hence, if you want a backslash, you need to add another backslash in front of it. (E.g. \\ will give you a backslash)
Forum: C++ Apr 6th, 2008
Replies: 5
Views: 2,610
Posted By chiwawa10
yeah, I think the only way to check is the value. Since an unsigned 8 bits integer (or unsigned char) can only store (0 to 255). The best way is to check whether the value is between the range.
...
Forum: C++ Apr 6th, 2008
Replies: 15
Views: 6,407
Posted By chiwawa10
If you wanna stick to your code, its fine. Just make some modification for an elegant solution. Here's my advice. I prefer to seed the random number generator first, then use the modulus (%) function...
Forum: C++ Apr 6th, 2008
Replies: 2
Views: 1,752
Posted By chiwawa10
Here's a simple example of OOP in real life (building of a car). Before that, I would like to stress that this example is not complete and only explained at the overview level. Here goes:

A car...
Forum: C++ Mar 23rd, 2008
Replies: 6
Views: 854
Posted By chiwawa10
why not use the C++ STL string?

E.g.


#include <iostream>

using namespace std;

int main()
Forum: C++ Mar 20th, 2008
Replies: 12
Solved: Arrays[]
Views: 759
Posted By chiwawa10
array is easy. you declare them statically like, int a[10] for an array to store ten integers.
Accessing them are simple:
a[0] = the first item
a[1] = second item
a[9] = the last item

*be...
Forum: C++ Mar 16th, 2008
Replies: 4
Views: 574
Posted By chiwawa10
if you're gonna pass the address of the variables as stated in line 23:
void yrCalc(int totalDays, int& year, int& month, int& day)

Your variables should contain also their address in line 16:...
Forum: Java Aug 25th, 2005
Replies: 4
Views: 1,453
Posted By chiwawa10
Thank you for advising... That address my problem very well :p I will try to implement my own methods.
However, my main concern is performance. Will it be too costly if I scan the value of each...
Forum: Java Aug 24th, 2005
Replies: 4
Views: 1,453
Posted By chiwawa10
greetings,

I would like to build a subset from a Hashtable. The subset is a Hashtable too. How could I do it? Is there any API out there?
Any advise or guideline are appreciated, thank you!
...
Forum: ASP.NET Jul 27th, 2005
Replies: 0
Views: 1,975
Posted By chiwawa10
I have been trying to find out what is the meaning of m_nRetCode (value=1012). I get this exception when my program try to execute insert entry into database. Can anyone pls tell me what is the...
Forum: ASP.NET Jul 25th, 2005
Replies: 6
Views: 3,097
Posted By chiwawa10
ok... how can I implement transaction in my code?
I know there is a function called BeginTrans() but since I'm using ExecuteSQL(), is it relevant?
any example would be nice, thank you!
Forum: ASP.NET Jul 25th, 2005
Replies: 6
Views: 3,097
Posted By chiwawa10
ohh.. I found out that error occurs by checking the DB. There are some data not inserted into the DB but the program did not throw any CDBException. If it had thrown any exception, the error would...
Forum: ASP.NET Jul 25th, 2005
Replies: 6
Views: 3,097
Posted By chiwawa10
Dear paladine,

part of my code is like this:

TRY{
ExecuteSQL(...) //query to insert data into database
}

CATCH(CDBException e){
.....
Forum: ASP.NET Jul 21st, 2005
Replies: 6
Views: 3,097
Posted By chiwawa10
Hi all,

I'm facing this problem in my running app. It is a real-time app and writes to the database whenever data is received. However, there is rare occasions that causes the ExecuteSQL to fail....
Forum: C++ Jul 7th, 2005
Replies: 2
Views: 7,631
Posted By chiwawa10
for more info, pls browse: www.cplusplus.com or msdn.microsoft.com (if you're using VC++)
Forum: C++ Jul 7th, 2005
Replies: 8
Views: 2,707
Posted By chiwawa10
include the header file --> #include <stdlib.h>

then add this --> system("pause");
before the return 0;


*It causes the program to stop until it detects any keypress...
Forum: ASP.NET Jul 7th, 2005
Replies: 0
Views: 4,826
Posted By chiwawa10
Hello,
I'm facing a with a real-time app. This real-time app is reading data from the serial port, then, process it. However, it seems to miss some data when the computer has some other apps...
Showing results 1 to 34 of 34

 


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

©2003 - 2009 DaniWeb® LLC