Monday, February 28, 2011

Solving 'classname' followed by 'int' is illegal (did you forget a ';'?) error in C++

While doing class based programing in C++, the following error occurs.
 'classname' followed by 'int' is illegal (did you forget a ';'?)
The error occurs if the class declaration is not terminated properly.
Class declarations should end with a semicolon.
In the above program, the class terminates near the yellow marking, but a semicolon is missing.
Remember that the same structure of a "struct" is used for classes too. Structures end with a semicolon,similarly classes should also end with a semicolon.

Wednesday, February 16, 2011

Images in addon domains not loading

While hosting addon domains on hosting with Cpanel, the images in the addon domains may not load.This is due to configuration problems on the server. To fix this, just disable "Hot Link Protection" in Cpanel.
I discovered this solution while troubleshooting a problem for a friend.

A client's domain name, vasantravels.com was added as a addon domain to their primary hosting account that was bought with "square brothers". But, when the page was loaded, it looked like the image below, without any images.
After hanging around with the DNS settings and file names for few days, finally found out that "Hot link protection" is the culprit.
To disable "Hot link protection", goto domainname.com/cpanel and login with username and password.
Find the "Hot link protection" icon on the interface, as shown below.
After opening the "Hot link protection" page, disable the feature.

Finally, all is well, and the site loaded well.
Replicate this procedure if you were having trouble with images from add on domains not loading properly.

Tuesday, February 15, 2011

Turn off wifi in Nokia c6

Nokia c6 (nokia 5800) and most symbian phones with WLAN (Wifi) capability connects to wifi automatically most of the time. This causes significant battery drain and reduces the standby time of the phone. The reason for nokia phones to connect to wifi all the time is because of the Email client int he phone.
By default, when we setup a Email profile, the settings are such that the phone connects to a wifi network whenever one is available and configured.
The phone connects again even if we disconnect manually in the settings menu.
Follow this procedure to turn off the wifi automatic connection and to preserve standby time.

Open the Email application, Goto Settings and select the profile name.

In Synchronisation, select "Retrieval days".
Deselect all the days and select OK.

Hereafter, the phone will not connect to wifi automatically. You can still retrieve the emails manually.Also, while sending an email, wifi will connect and send the mail ,then it will disconnect.

List of bugs in Nokia C6


The purpose of this post is to list all the bugs that i have encountered in my Nokia C6 phone which i bought two months back. All these bugs are persistent and keep bugging me often.I have already installed all available firmware updates.

1. On startup, phone displays the error message "System Error". This error message occurs every time the phone is restarted.

2.When Maps is minimized and opened again, i get the error "Not enough memory to perform operation".

3.When maps is not properly closed,and i open it again, nothing happens. I have to restart the phone to fix this bug.

4.While composing and sending a message, when i click the Send button, the phone gives the error "Unable to send".This happens at least twice daily. If this error occurs, it is not possible to send the message again.Nothing happens if i send again.Phone just says "Sending" and does nothing.It is not even possible to save the typed message.If i save in drafts, it will be saved as an empty message only. The only option to save the typed data is to copy/paste from the message screen. This error is a very annoying one.

5.Wifi stays ON all the time wasting phone battery charge.Once i configure the wifi, it connects even if i manually go to Settings->Connectivity->WLAN->Wifi hotspot->Disconnect. I got tired of manually disconnecting, only to find that it connects after a few minutes again without my permission.There should be option to turn OFF wifi.
Nokia C6 always ON wifi

Update: This problem was due to a configuration error.See this article, Turn off wifi in Nokia phone.

6. Sometimes, while making a call from the inbox by selecting a message and clicking the green call button, phone says "Call not allowed".If this happens, the only way to recover from this error is to restart the phone, otherwise it keeps on giving the same error message.

7. GPS fails to connect most of the times. Only after repeated attempts at restarting and reopening Maps, GPS connects.

//Screenshots not available for all bugs since they are not easy to replicate.

With Nokia favoring Windows platform, it remains to be seen whether the already neglected Symbian platform will get any attention, if at all ,  from Nokia.