Posts
 
Reputation
Joined
Last Seen
Ranked #1K
Strength to Increase Rep
+6
Strength to Decrease Rep
-1
100% Quality Score
Upvotes Received
32
Posts with Upvotes
26
Upvoting Members
7
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
8 Commented Posts
0 Endorsements
Ranked #818
~44.4K People Reached
About Me

Datta, Dayadhvam, Damyata

non quasi imperans dico sed per aliorum sollicitudinem etiam vestrae caritatis ingenitum bonum conprobans

Favorite Forums
Favorite Tags
c++ x 51
c x 14
Member Avatar for linq

Make sure you created a Win32 project and not a console project (how to do that depends on your IDE)

Member Avatar for NathanOliver
2
194
Member Avatar for Eddy Dean

You shouldn't have to bother with all that, since InternetOpenUrl expects LPCTSTR (typedef as const TCHAR*) as its second argument. Try: [code] hFile = InternetOpenUrl( hINet, sUrl.c_str(), NULL, 0, 0, 0 ); [/code]

Member Avatar for Salem
0
2K
Member Avatar for nhandal

Well, it seems likely the problem is in one of the two parameters you pass to the LoadBitmap function. You should check the return value of GetLastError after LoadBitmap fails, and look it up [url=http://msdn.microsoft.com/library/default.asp?url=/library/en-us/debug/base/system_error_codes.asp]here[/url].

Member Avatar for lashatt2
1
424
Member Avatar for FireSBurnsmuP

Do you mean the length of a c-style string (char array) or the length of a std::string? You could use strlen for the former, and the length() member function for the latter

Member Avatar for geinjo
0
2K
Member Avatar for noxee

[code] string input; while (!ifile.eof()) { getline(ifile,input); cout << input << endl; } [COLOR=red] ifile.seekg(0,std::ios::beg); //reset read pos to beginning ifile.clear(); //clear eofbit [/COLOR] while (!ifile.eof()) { ifile.get(ch); cout << ch; } [/code]

Member Avatar for Ayu1004
0
301
Member Avatar for ArNy

A major difference that hasn't been noted (unless I just missed it) is that 2005 uses C++/CLI for .NET programming, whereas 2003 uses the older managed extensions for C++. Just to clarify, C++/CLI is essentially its own language, though it is based on C++. Also, all the express versions are …

Member Avatar for lwxmeme
0
487
Member Avatar for virus.exe

[quote=~s.o.s~;333350]> In C. It's not a good idea to use that in C++, use cin.get() instead. Any good reason to back that up ? ;)[/quote] According to the standard, the c header files are deprecated, meaning they might be removed from the standard in future revisions.

Member Avatar for WaltP
0
2K
Member Avatar for NSta

[code] Entry *entry; entry = [COLOR=#0000ff]new[/COLOR] Entry(media, entertainment); [/code] What are you trying to do here? You've already assigned the private members of the class (_media and _entertainment). And once the function returns, the newly allocated Entry object is lost (memory leak)

Member Avatar for NSta
0
127
Member Avatar for disc

In addition, you may want to search for "functor" or "function object" for more information.

Member Avatar for disc
0
159
Member Avatar for venomlash

It's not an "abnormality," it's actually part of the C++ standard. As I understand it, operators like 'and' and 'or' are included for users with different character sets. See: [URL]http://david.tribble.com/text/cdiffs.htm#C99-alt-tok[/URL] Microsoft compilers appear to implement these as macros instead of keywords in the ciso646 header. As for the second part …

Member Avatar for vegaseat
0
199
Member Avatar for kararu

Could you post a short program that demonstrates the problem (and that we can actually compile)?

Member Avatar for kararu
0
243
Member Avatar for DmD

Since it appears you are using managed (.NET) code, why not use the .NET classes for file IO? I'm no expert at C++/CLI but it might be as simple as: [code] System::IO::StreamWriter^ sw = gcnew StreamWriter("file.txt"); sw->WriteLine(txt1->Text); [/code]

Member Avatar for Nick Evan
0
1K
Member Avatar for lalalu

The first part looks ok to me, but for the second part you also need to allocate space for each pointer in the array

Member Avatar for lalalu
0
984
Member Avatar for Clinton Portis

If you're going to use std::find like that, you need to define an equality operator for your info class: [code] class Info { public: bool operator==(const std::string& first_name); //... } [/code] However, you may want to use std::find_if instead. find_if allows you to specify an unary predicate as the matching …

Member Avatar for iamthwee
0
125
Member Avatar for doraemon

What do you expect to happen? After you increment 'p' in your third loop, it points past the last element of the array, so you're bound to get garbage data on your last outputs.

Member Avatar for rowly
0
144
Member Avatar for phuduz

Try indenting/using code tags (some IDEs can even indent for you!): [code] #include <iostream> #include <string> #include <iomanip> using namespace std; int main() { // Declare Variables int withdraw; string name; double acctbalance, deposit; char choices; acctbalance = 0; //inputs, get the name and initial balance cout << "Enter Name: …

Member Avatar for ~s.o.s~
0
101
Member Avatar for mikeallen

hand appears to be a 2-dimensional array, in which case you need to compare each element (if you use only one subscript, you're comparing a pointer to an integer) [code] if (hand[i][0]==1 && hand[i][1]==2 && /*...*/) [/code] Of course, the problem here is that the cards may not be in …

Member Avatar for bumsfeld
0
113
Member Avatar for matrimforever

Is that table correct? I would think that you should start with two rabbits, then the number should double each month (i.e., exponential growth of 2^x)

Member Avatar for matrimforever
0
365
Member Avatar for zith7400

Any particulary reason you're writing procedural code in C++? A better approach would be to create a tree class that handles everything. Anyways, one major problem you have is that you pass a single pointer to traverse. The pointer in traverse is local to the function, so setting [inlinecode] current …

Member Avatar for ~s.o.s~
0
241
Member Avatar for nanodano

Your code shouldn't even compile. You're missing a using declaration (I assume) and main should return 'int' Also, you should use std::stringstream instead of strstream (I believe the latter is deprecated)

Member Avatar for nanodano
0
127
Member Avatar for hoosier23

[quote=hoosier23;258055] What is the logic behind using float SavingsAccount::annualInterestRate = 0; right before my main? I see that you are setting annualInterestRate to zero, but why does this need to be done? Afterall, I have made annualInterestRate .03 in the default constructor. [/quote] I believe static variables will be automatically …

Member Avatar for Salem
1
183
Member Avatar for Killer_Typo

Look at [URL="http://www.cplusplus.com/ref/iostream/ifstream/"]std::ifstream[/URL]. E.g.: [code] #include <fstream> #include <string> //... std::ifstream infile("somefile"); if (!infile.good()) { //failed to open } std::string line; std::getline(line,infile); //read a line into std::string [/code]

Member Avatar for Killer_Typo
1
385
Member Avatar for hoosier23

Looks like a decent start. You just need to find a way to get the correct subscript into 'deck' to assign values in the inner loop, and then figure out how to shuffle the deck. The simplest way to do the last part is probably std::random_shuffle. You might also consider …

Member Avatar for iamthwee
1
122
Member Avatar for MrLew

How exactly are you linking this? I see you have two entry points (in pointTypeImp.cpp and circleTypeImp.cpp) and circleTypeImp.cpp relies on code from pointTypeImp.cpp. Obviously, though, you aren't linking these two files or you would have a multiple definition error for main. Generally, you should have separate files that contain …

Member Avatar for MrLew
1
204
Member Avatar for amano

> One more thing, if i can't call main() recursively, can u suggest me any other way to call the main just after finish other function. You don't need to call main; when your function finishes, it returns the calling function. If you need the code to repeat, use a …

Member Avatar for Dave Sinkula
0
1K
Member Avatar for Flay

Maybe there's a problem with your compiler/IDE installation or with the header files. Also, make sure your code is being compiled as C++ and not C

Member Avatar for GloriousEremite
1
277
Member Avatar for Marthy
Member Avatar for linq

Some more info can be found here: [URL]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winprog/winprog/windows_data_types.asp[/URL] Namely, it says that WINAPI and CALLBACK are both defined as __stdcall (it might not help you much, but [URL="http://msdn2.microsoft.com/en-us/library/984x0h58.aspx"]this[/URL] explains different MS specific calling conventions)

Member Avatar for GloriousEremite
0
410
Member Avatar for nhandal

Could you post a short example program that we can compile, and that demonstrates the problem?

Member Avatar for nhandal
1
101
Member Avatar for linq

Try pressing alt-tab. It might appear elsewhere as well, but I can't think of where at the moment.

Member Avatar for GloriousEremite
1
93