Yes, i am getting this error again and again today. Just clicked on reply link of your message and the error appeared. Worked perfectly in next try.
Imran Farooqui
Posts
-
Errors encountered while surfing CP?? -
Where can i find a good socket classIn my experience, as far as client side is concerned,
CSocket/ASyncSocket
should never cause any trouble. Though i personally preferCAsyncSocket
overCSocket
, to avoid blocking issues. As suchCAsyncSocket
requires special care[^]. If we talk about server side, it depends upon the scalability desired (i.e the maximum number of users you want to simultaneously connect) and throughput (Data flow rate into and out of server). If both the attributes are lowCAysncSocket
should work fine. Otherwise you may need to dig into WinSock API and I/O completion ports. -
Map URL address to IP addressYou first need to resolve the URL to corresponding IP address:
struct hostent * host = gethostbyname(name);
if ( host == NULL )
{
AfxMessageBox("gethostbyname() failed");
return;
}struct in_addr addr;
memcpy(&addr, host->h_addr_list[0], sizeof(addr));
sprintf(m_strHost,"%s", inet_ntoa(addr));
printf("Resolved Host is %s\n\n",m_strHost);
-
A complex c++ question.Please refer the code i wrote above: In the constructor of
CTest
class, there is anexit(0)
call. So this program will never enter the main function. Trick is that, in C++, global objects are created before program enters the main function. So we created the object ofCTest
class as a global object. As such its constructor gets called in which we first print our desired string and thenexit(0)
gets calls and the program ends. -
A complex c++ question.#include "stdafx.h"
using std::cout;
using std::endl;class CTest
{
public:CTest()
{
cout << "Hello John bye" << endl;exit(0);
}
};
int main(int argc, char* argv[])
{
cout << "John" << endl;return 0;
}CTest test;
-
Hurricane IsabelI was surprised to read that the maximum rain associated with this hurricane was about 6 to 11 inches. Surprised because this amount is something “normal” here in South Asia during monsoon and a daily routine at number of places during the season. Ofcourse winds are the major feature of Hurricane than rain.
-
Is C++ still alive??????????M.Shoaib Khan wrote: i am a student of computer system engineering Thats cool...one more computer related person. BTW honestly tell me whether you advice your young nephew to become software engineer now ? M.Shoaib Khan wrote: i was just looking the pakistani software market and noticed that there are very very few places where any project is now being done in C++. Looking at your profile, you belong to Lahore. Yes the focus of people is shifting away from C++, but here in Karachi there are still many many many companies working in C++ (including mine ;)) M.Shoaib Khan wrote: once it happened with me that my teacher was unwilling to accept my DB project becoz he says it is in VC so it is of more of system programming stuff He has given you a project and now it is your choice to do it any way yourself. If he is not accepting your project just because it is in C++, then sorry to say that the man is an extra mass on country's educational system. M.Shoaib Khan wrote: i dont know the reason Companies have their own finiancial and commercial reasons and also it depends on a project. New languages are much easy to deal with, more object oriented, low nuisances and features suitable to low quality programmers like ease of use, automatic garbage collection e.t.c Traditional C++ libraries like MFC are there for about a decade. MFC was introduced to make the windows programming easier by encapsulating many low level API details. MFC was used widely. Many top class windows applications were written on it and it ruled for many years. Now we've to move forward. Traditionally there we problems in writing application directly in assembly so there joined C. It was proved difficult to write win32 apps in C, so there came MFC. Now we've to move forward. There are better tools now, better hardware and better software engineering techniques. All languages and tools are for us, and we should select right tool for right job. You work in C++, thats very good and those who are not accepting you are totally morons. But we should also try to go one step ahead and see what is inside new languages and why are the people accepting them quickly and then use them for right job.
-
Heat wave in South IndiaJust checked the current temperatures of the region and compare with averages: Coastal Areas: Bombay: 32 C (normal) Karachi: 32 C (normal) Calcutta: 39 C (above average) Madras: 44 C (very hot...me astonished) Inland: Nagpur: 45 C (normal) Lahore: 44 C(normal) Bangalore: 36 C (little above average) Sibi: 51 C (normal) Hills: Shimla: 39 C (now this is somethng to worry about) Srinagar: 28 C (Above average ....) Murree: 19 C (normal) Yes, temperatures of South India are going above average these day. But hilly areas temparatures are something to more worry about. Coastal areas are fine. ;P
-
Coding without EnglishRohit Sinha wrote: And why didn't the idea work? First reason is the comment of Mother Teresa in your sig, unfortunately most people are not interested folowing this rule. :( Second reason is that outstanding software developers produced in our countries love to work for the country of President Bush. ;P
-
Coding without EnglishNishant S wrote: Have any of you ever used any programming language that didn't use English-keywords? Back in 1999 when i was a University student, few of my seniours developed a full fledge compiler in Urdu language. The resultant software was named as U-Language. Initially it was proved to be a miracle but the idea didn't worked.
-
The return of winterMegan Forbes wrote: it is snowing this morning Not everyone is sooooooooo lucky. It is very hot at my location. Currently 109 F, and it is just the beginning :(
-
America's blind spotRohit Sinha wrote: Which company? Have you got anything more substantial than allegations? Yes, three companies came under sanctions, one in from North Korea, second is from Pakistan and third is from India. Indian company is NEC Engineers Private Ltd, which according to US, was involved in arms exports to Iraq. (Funy to note that these three companies never relied on US aid)
-
How to quickly find a value use std::mapsanddriftye wrote: How can I doing this? By asking your question in The Soapbox[^], because this is not the correct forum to ask this question. Thanks.
-
Windows Server 2003 key leakFrom the article: With the release of Office XP in May 2001 and Windows XP about six months later, Microsoft added a piracy-fighting tool known as product activation. Before then, businesses or consumers needed a key code to install Microsoft software, and the process stopped there. Product activation took it a step further. The computer would need to contact Microsoft over the Internet. The hardware configuration and license information would be collected and associated together in an anonymous database. Even whatever mentioned above didn't worked in South Asia and hopefully same is expected again. I obtained the pirated CD of Windows XP Profesional in which all registration steps were missing from setup program :eek: and OS is running normally ;) I've no idea how they did it, (i think playing with hex editors).
-
View of SaddamMichael A. Barnhart wrote: still do not understand why. From the media reports I receive Saddam does not appear to respect the Islam faith, just use it. Hmmm. The reason is that Saddam stood firmly against USA. You know about the relations b/w Islamic countries and Israel. And because USA supports Israel by providing weapons e.t.c, it is assumed by muslim countries that USA is also their "enemy" because it supports Israel. Michael A. Barnhart wrote: Really back to how much of our information is slanted by the media availability. Your views about Media are absolutely correct. But there are many other reasons that a common man in any Islamic state assumes that US motive is to obtain oil from Iraq. For example protests inside USA where people holding banners like "No WAR for OIL", whatever Anti- Bush comments passed in Oscar Awards e.t.c. One other reason it that, during the days when Saddam was regarded as a "cruel" person on the earth by Muslims, USA was a "good" friend of Saddam at that time.
-
View of SaddamIn the past, Saddam Hussain was never regarded as an ideal personality in our muslim countries. Just before the start of war when there were protests around the golbe, it was noticable that the protests in Muslim countries were at much smaller scale as compare to the protests in non-muslim countries. Anyways, due to the recent US policies, today Saddam is a "great hero" for many muslims around the world. The love for Saddam Hussain increased many folds when during the second day of war, it was reported that US companies are assured to get all the oil field tenders in Iraq after war and so Israel is expected to get benefit.
-
Al JazeeraOur media is showing "everything", even the pictures that not yet appeared on the site you mentioned. And yes everything is extremely shocking. We also came to know that common man inside Baghdad don't even know that US/UK forces are about 30 miles from his city.
-
[WAR] Poor peopleYaap, i saw the horrible scene of bomb blast on Television. Large numbers of injuries too and not much space available in hospitals and people are screaming .,argh... No idea whether it was targetted or software fault but the victims are again innocent people (whether from Baghdad or those were in WTC).
-
[Waricket] Kumble yet to decide on his futureRohit Sinha wrote: Who do you think will be the captain then? If not Ganguly, then may be Dravid. (BTW what is your choice in absence of Ganguly). Rohit Sinha wrote: Tendulkar will most probably not be there, Tendulkar is 30 yrs old and IMO he should play two more world cups. Yes his fitness is a problem but really speaking his performance and quality of shots are increasing day by day, as we witnissed in this world cup. Loss of Tendulkar will probably be the greatest loss in the history of cricket. Rohit Sinha wrote: along with Sehwag. Is he capable enough to replace Tendulkar ? Is saw him first time in World cup so i am asking here.
-
Chalk one up...Hi Rohit !! Have they reached India (i mean your cricket team). What was the public reaction when they entered airport lounge ?? Because of Iraq issue all other news are under shadows. Thats why i am asking you ? Our team is still under tight security