15,300 Posted Topics

Member Avatar for wendy2learn

>>it gave me runtime error everytime I compi Impossible. Compiling a program can not produce runtime errors-- such errors are called [b]compile time errors[/b]. Only running the executable program can product [b]runtime[/b] errors. If that compiler gives you so much grief why use it? Toss it into the bit bucket …

Member Avatar for Salem
0
778
Member Avatar for xerenist

[QUOTE=iamthwee;439051]It is also quite possible that Ancient Dragon edited so it has lost its original meaning.[/QUOTE] Nope. I didn't change the actual content of the post, just added code tags around that triangle to retain the spacing.

Member Avatar for Ancient Dragon
0
117
Member Avatar for n.aggel

you can't. files know nothing about colors and fonts. The best you can do is use some sort of color tags that is recognized by the program that reads the file -- for example Notepad doesn't recognize any, but the browser might if you use color html tags.

Member Avatar for GreenDay2001
0
98
Member Avatar for Herm

The only thing I know about Holland is that they have lots of tulips and hills.

Member Avatar for Lardmeister
0
241
Member Avatar for Duki

There's not that much of a difference -- one is a member of a c++ class and the other isn't. [code] #include <iostream> using namespace std; class MyClass { public: void operator<<(std::string str) { cout << str;} std::string SayHello() {return "Hello\n";} }; // non-member operator ostream& operator<<(ostream& stream, class MyClass& …

Member Avatar for iamthwee
0
93
Member Avatar for Renjith VR

Instead of attempting to change the size of the terminal (not sure that is even possible) figure out how to align the data correctly. That will probably require knowledge of and use of terminfo information because every terminal may be different.

Member Avatar for Narue
0
148
Member Avatar for WEATHER CHANNEL

[QUOTE=sutherlin;436208]i need help[/QUOTE] counjure up a 4-year-old thread then post some irrelevant crap -- yes you do need help.

Member Avatar for hollystyles
0
271
Member Avatar for MattEvans
Member Avatar for Ashu@sym

UNICODE is the default setting for that compiler so if you didn't turn it off then the compiler is mapping TCHAR into wchar_t. go to Project --> Properties (bottom menu item) --> Configuration Properties --> General then change [b]Character Set[/b] option to [b]Not Set[/b]. If you really do want UNICODE …

Member Avatar for Ashu@sym
0
2K
Member Avatar for curt22

Are you using MFC or pure win32 api? My best suggestion for you is to download the several example programs you can find with google and try them out. Nothing helps one understand a problem like practicle demonstration.

Member Avatar for Ancient Dragon
-1
74
Member Avatar for Duki

If Order can contain one or many pizzas then it should have a vector of pizza objects, and pass the Pizza object by referenct so prevent unnecessary duplication of the object. [code] class Order { public: void addPizza ( Pizza& order) ; void outOrder ( ) ; private: vector<Pizza> theOrders; …

Member Avatar for Duki
0
189
Member Avatar for m_meena

[URL="http://discuss.fogcreek.com/joelonsoftware/default.asp?cmd=show&ixPost=862"]This[/URL] is an interesting thread that talks about command-line compiles

Member Avatar for Narue
0
126
Member Avatar for DeathEvil

strstr() expects the first parameter to be a char* pointer, not a std::string object. use the c_str() method to get the pointer [code] strPtr = strstr(phone_book[index].c_str(), lookup); [/code] But you don't need to use strstr() at all because std::string has a lookup function called find(). It returns an int to …

Member Avatar for DeathEvil
0
161
Member Avatar for gaowei

where is what wrong? Do you get compile errors ? If yes, then post some of them. Sorry, but I don't have my crystle ball with me today :)

Member Avatar for Aia
2
177
Member Avatar for rjc

No need for doubles here -- you can use int for both hours and minutes, use the mod operator to get the number of minutes left over after getting the hours int hours, minutes_late; hours = minutes/60; minutes_late = minutes % 60; Lets say that minutes = 62. hours will …

Member Avatar for WaltP
0
96
Member Avatar for MattEvans

[quote]If the first sequence of non-whitespace characters in str does not form a valid floating-point number as just defined, or if no such sequence exists because either str is empty or contains only whitespace characters, no conversion is performed[/quote] [url]http://www.cplusplus.com/reference/clibrary/cstdlib/strtod.html[/url] From the above I don't think the value of the …

Member Avatar for Narue
0
138
Member Avatar for conan19870619

>>How are an object’s data members initialized if a class has only an implicitly defined default constructor They aren't initialized -- they contain whatever value happens to be there at the time the class object is instantiated. That's the purpose of writing your own constructor. >>And why a class might …

Member Avatar for n.aggel
0
575
Member Avatar for eranga262154

you could have read it directly into the integer [code] long next4; fileopen.read (&next4, sizeof(long) ) ; [/code] or you can use the assignment statement [code] int main() { char next4[4] ; int num; while(!fileopen.eof()) { fileopen.read (next4, 4 ) ; num = *(int *)next4; } } [/code] A third …

Member Avatar for eranga262154
0
200
Member Avatar for eranga262154

line 16 is not needed because the file pointer is always set to beginning of file when the file is opened -- line 12. line 17 is an infinite loop because lines 19 and 20 reset the file pointer back to the 4th byte in the file on every loop …

Member Avatar for eranga262154
0
2K
Member Avatar for annagraphicart

This is the sort of program where a structure or class comes in handy -- makes sorting the data a whole lot simpler. [code] struct bowler { string name; int score; }; [/code] >>However, I want to change it where the "int score" is, so that the user can input …

Member Avatar for Ancient Dragon
0
102
Member Avatar for curt22
Member Avatar for curt22
0
142
Member Avatar for Dave Sinkula

>>And the immigrants that have made the USA great are those that chose to join the melting pot, not those who chose to make the melting pot join them! That's true for the most part -- but there other groups scannered around the country who choose not to fully integrate …

Member Avatar for EnderX
0
331
Member Avatar for neilyan

Your code is missing closing brace and semicolon at the end of the class declaration and before main() on line 58. After correcting that you can probabably figure out how to correct the other one million errors.

Member Avatar for neilyan
0
170
Member Avatar for Sturm

[QUOTE=cscgal;435593]But then it wouldn't be able to be opened by any Windows machine.[/QUOTE] Not correct -- most of the c++ header files do not have extensions and are read/written ok with most windows compilers and text editors. File extensions are not enforced by MS-Windows os. However -- if we're talking …

Member Avatar for Chaky
0
198
Member Avatar for cwarn23

If you are that new to c++ then there is no way you can complete that project right now. Learn the language first by reading some introduction to c++ books or eboks. Read through the [b]Read Me[/b] threads at the top of this board for lots of good links and …

Member Avatar for Ancient Dragon
0
108
Member Avatar for veronicak5678

>>Why does my program stop after the validation Because you didn't tell it to loop back to the beginning of main(). If you want the program to execute all that code again you have to put the code in a big loop. My suggestion is to put it in another …

Member Avatar for veronicak5678
0
108
Member Avatar for Geek-Master

It is also used by programs when executing other programs. The return value tells the calling program whether it successfully executed its job or not. The return value is useful in a lot of situations, even in Windows programs.

Member Avatar for spankyg
0
190
Member Avatar for starjsjwars

[QUOTE=starjsjswars2;435065]hmm... but what i mean is in the command prompt i tpye in C:/programfiles/blahblahblah so i hit enter. it opens the .exe. So when i hit the arrow up botton it has the same cmd in it.. so what i wanna do is have that arrow go up and exeute …

Member Avatar for starjsjswars2
0
159
Member Avatar for Duki

>>int HotDogStand:: totalSales = 0 ; this line goes into a *.cpp file, not the *.h file because it actually declares an object.

Member Avatar for Duki
0
92
Member Avatar for SurviBee

count the arguments -- the function at the bottom of your code has 12 arguments but the function prototype at the top has only 9 arguments -- they are not he same function.

Member Avatar for SurviBee
0
229
Member Avatar for AllenN

you can also find the maximum values in the header file limits.h -- and most 32-bit compilers today support a 64-bit integers, such as __int64 (Microsoft compilers) or [b]long long[/b] other compilers. >>does this 4 billion refer to the numbers in quantity or the amount of numbers I can put …

Member Avatar for AllenN
0
209
Member Avatar for jainam2209

[QUOTE=StrikerX11;434640]You may use the system function![/QUOTE] That might work with *nix, but not MS-Windows.

Member Avatar for Ramy Mahrous
0
125
Member Avatar for gplkrsna

Its ok because string literals are in the heap and not the stack. However, because the function is returning a string literal the return value should be declared as [b]const[/b] keyword. [code] const char *throwstring(); [/code] [b]main()[/b] should be declared as [b]int main()[/b] and not leave it up to the …

Member Avatar for Narue
0
150
Member Avatar for BigFormat

>>There are many places where being off by just 1 character can radically alter the behaviour of a program OMG its sooo true, I've had that happen all too often.

Member Avatar for BigFormat
0
158
Member Avatar for siddharthrainit

>>please help me for solving my problem. I'm absolutly frustrated now Not possible if you don't post the code.

Member Avatar for Colin Mac
0
165
Member Avatar for Journey:Start

>>Any heads up message would help me out Yes -- read whatever manuals the manufacture publishes because there is no standard way of doing it. Some even provide SDKs, some are free and others aren't.

Member Avatar for Journey:Start
0
89
Member Avatar for nasa8209

without the CD, you will probably have to take it back to the store where you bought it and have them reinstall vista. Or try [URL="http://www.microsoft.com/windows/shop/upgradenow.mspx"]this[/URL]

Member Avatar for Ancient Dragon
0
84
Member Avatar for shadow20

>>cannot boot into harddrive what do you recommend Reformat the hard drive with a low-level formatting tool then reinstall the operating system and all other programs that you lost. Or you could do what I did once -- toss it out the back door and smash it into millions of …

Member Avatar for raybay
0
130
Member Avatar for pmahalakshmi

[URL="http://developer.sonyericsson.com/message.jspa?messageID=99352"]Read this[/URL] I found with google. Apparently that compiler is for a mobile computer, but I don't know for sure. My guess is that you can forget nearly everything you know about Turbo C++ when working with that compiler. It's a whole different world when working with embedded compilers.

Member Avatar for vijayan121
0
97
Member Avatar for Ballar32

Also we normally discourage the use of scanf() with"%s" because it will allow you to corrupt the program's memory by scribbling outside the boundry of the arrays. For example if [b]make[/b] is declared as an array of 10 characters and you type 15 characters then scanf() will write the extra …

Member Avatar for Ballar32
0
267
Member Avatar for cspivey

you need to put the information in the input files into one vector, then sort the vector, and finally write the vector contents to the output file. From the example files you posted this will be fairly simple. You can use std::sort to sort the vector after reading from the …

Member Avatar for jusakman
0
150
Member Avatar for ssharish2005

win32 api has functions to parse them. Don't know about *nix. Also, see [URL="http://www.codeproject.com/useritems/SimpleIni.asp"]this article[/URL]

Member Avatar for ssharish2005
0
96
Member Avatar for waqar40

Is the server checking the status of the socket connections before attempting to use them?

Member Avatar for waqar40
0
75
Member Avatar for jarv

[QUOTE=jarv;432885]i am using Vista Ultimate, does this matter?[/QUOTE] No -- that error has nothing at all to do with the operating system. Without seeing your code I guess that you left out a semicolon somewhere.

Member Avatar for jarv
0
6K
Member Avatar for anilmpatil01

We have no clue what you are asking. Please explain in greater detail and post some code if you can.

Member Avatar for Ancient Dragon
0
36
Member Avatar for jaepi

you header file need code gards to prevent that, like this [code] #ifndef MYHEADER #define MYHEADER // code goes here #endif [/code]

Member Avatar for GreenDay2001
0
211
Member Avatar for ocean001

The solution is to make sure you coded that function with exactly the right parameters (in your case the function does not have any parameters). If there is a [b]OnBnClickedBackBtn[/b] function make sure it contains the class scope [b]CTryDlg::[/b] (Been there and done that mistake too).

Member Avatar for ocean001
0
174
Member Avatar for boja123

If you use a compiler such as VC++ 2005 (Pro edition) or eVC++ 2.0, or eVC++ 3.0, or eVC++ 4.0 you can have it generate the MIPS assembly code. >>and print anapshot of the registers and the results Not sure how to do that because the value of the registers …

Member Avatar for boja123
0
110
Member Avatar for The Dude

Is the husband of a woman who is President still called The First Lady ?

Member Avatar for Ancient Dragon
0
263
Member Avatar for bhmails

[URL="http://www.phim.unibe.ch/comp_doc/c_manual/C/FUNCTIONS/getchar.html"]getchar[/URL] is the standard C library function. Borland compiler has many functions that have no standard C library equivalent, such as everything in graphics.h.

Member Avatar for TkTkorrovi
0
303

The End.