6,741 Posted Topics

Member Avatar for jaepi

There's a point at which an introduction is unnecessary. You would already be too famous (or infamous).

Member Avatar for jaepi
0
183
Member Avatar for Woody714

I kind of missed the part where you described what the output was supposed to look like. Can you post it again for me?

Member Avatar for John A
0
926
Member Avatar for maravich12

DB was lame. DBZ had one or two good scenes. DBGT also had some good scenes, but it went too far over the top to be as good as DBZ.

Member Avatar for maravich12
0
129
Member Avatar for Kenya19

>dont make your explanation too complex, as i am only 19. 19 easily makes you an adult, so that's not an excuse to pretend you're stupid. Perhaps "I'm not too familiar with the topics, so don't make your explanation too complex". >if you could tell me what the course entails,and …

Member Avatar for stymiee
1
319
Member Avatar for EnderX

>any mathematical equation involving numbers 10 and up would be (as >far as I can see) impossible to directly deal with. You can perform any kind of input using single character input. In fact, that's basically what all of the other input functions do: they read one character at a …

Member Avatar for Aia
0
156
Member Avatar for Matt Tacular

Your problem is that opening and closing files doesn't change the stream state. When you read fin to end-of-file, closing the stream doesn't change the eofbit. You need to clear the stream state as well as close the file if you plan on using fin to read from a file …

Member Avatar for Salem
0
149
Member Avatar for MrMan2787

>Is this possible? Yes. When you pass cin an integer type, it tries to read and format an integer. If the string it reads isn't a valid integer, it'll fail. You can use that to validate the input and try again: [code] #include <iostream> #include <ios> // For streamsize #include …

Member Avatar for Ancient Dragon
0
180
Member Avatar for ledox

>You can use atoi to convert the char to a int Or not, seeing as how atoi is a demon spawn. Use strtol instead, or since this is C++, stringstream or Boost::lexical_cast. Examples are common and can be found with this forum's search feature.

Member Avatar for blazted
0
92
Member Avatar for ghadahelal

C++ doesn't know what a folder is. That kind of operation is dependent on the operating system, and the solution will use a system specific function or class of functions. So, what compiler and OS are you using?

Member Avatar for ghadahelal
0
138
Member Avatar for Zay

Have you written a function that tells you the height of a binary search tree? If you have, you can use the same principles to solve this problem. If you haven't, you need to do a complete traversal of the tree (recursive is easiest) and for each node, return the …

Member Avatar for Narue
0
124
Member Avatar for christina>you

>Everyone is so nice...... You post in the wrong forums then.

Member Avatar for Narue
3
892
Member Avatar for blazted

value is an array. When you pass it as the second argument to get, it acts as the initializer for the std::string parameter. You've lost your reference, and any changes to the parameter will not be reflected back in displayAll. Change value to a string and pass it by reference …

Member Avatar for blazted
0
119
Member Avatar for tralfas

>public void itemStateChanged(ItemEvent ie) Either that's a typo and ie should be e, or you need to change any use of e to ie.

Member Avatar for Ezzaral
0
138
Member Avatar for Slavrix

In againstComputer, the first if statement needs braces. In main, when you test move, you used else instead of else if twice. And you use cMove before giving it a value in againstComputer.

Member Avatar for Slavrix
0
93
Member Avatar for katerinaaa
Member Avatar for twomers

>from cboard (I migrated from there) They weren't good enough for you? :icon_rolleyes: ;)

Member Avatar for jbennet
3
205
Member Avatar for srinath.sec

Every different program that uses a static library has its own copy of the library built in. A shared library only has one copy and every program that uses it just references that copy. How you create them depends on the tool you're using, and how they're named depends on …

Member Avatar for dwks
0
95
Member Avatar for quintoncoert

First and foremost, C++ is a language and Visual C++ is a tool for writing in C++. The difference Visual C++'s are different versions of the tool. VC++ 6 is the oldest version you mentioned, then VC++.NET, then VC++ 2005 Express. Don't use VC++ 6. It has bad C++ conformance, …

Member Avatar for jwenting
0
126
Member Avatar for laconstantine

>char *p = "india"; This is a pointer to a string literal. When you return p, you're returning the address of the string literal. A string literal has a lifetime beyond the function, so the memory isn't reclaimed and you don't get garbage. This is perfectly legal. >char p[] = …

Member Avatar for Narue
0
137
Member Avatar for ghadahelal

>shall i convert this address into hex before searching? Not unless you stored it as hex. >as i'm searching in a file in binary mode? This has nothing to do with hexadecimal.

Member Avatar for Narue
0
148
Member Avatar for ghadahelal

>which datataype can my input take. The same data type you used to write it if you want a meaningful comparison. If you're just checking for equality, you can use unsigned char and compare every byte individually. >also, the comapred stream is in this form 0004a4900 >i made this stream …

Member Avatar for Narue
0
88
Member Avatar for tonik69

Change this: [code] double M2_0(c,m) double c[160]; double m[16][5]; { [/code] To this: [code] double M2_0(double c[160], double m[16][5]) { [/code] C++ doesn't support the old C-style function declaration. C also no longer supports it, so I don't recommend using it in C either.

Member Avatar for tonik69
0
104
Member Avatar for chera

Put simply, inheritance is saying that one class is a part of another class.: [code] class A { public: void foo() { cout<<"foo\n"; } }; class B: public A {}; [/code] You can create an object of B and call foo because A is a part of B. B is …

Member Avatar for Sturm
0
76
Member Avatar for badrobot

Based on my limited knowledge of such matters, why don't you try putting the cin.get just before main returns?

Member Avatar for Narue
0
278
Member Avatar for CRD

>oes anyone know which include file is needed for functions; IsLetter (ch) and ToLower(ch) ? There are no such functions in standard C++. The cctype header has isalpha and tolower, which is probably what you're referring to.

Member Avatar for CRD
0
59
Member Avatar for bRutal!

The hardest part of learning any language is forcing yourself to write logically in that language. It's pretty easy to write C++ in C# because there are many similarities, but that's not necessarily good C#.

Member Avatar for bRutal!
0
100
Member Avatar for twomers

Most of my posts are in the software development category or the private forums.

Member Avatar for Infarction
0
86
Member Avatar for sushanttambare

Sorry, I have no idea what you're asking. Try rephrasing your question.

Member Avatar for sushanttambare
0
82
Member Avatar for ShawnMuller

>The code processes millions of transactions, but less than .01 % has this error. Any ideas? That's a typical floating-point rounding fudge. If it's a serious enough problem, you can try to use a more precise type such as long double, or remove floating-point altogether to maintain exact precision. Though …

Member Avatar for ShawnMuller
0
99
Member Avatar for imrickyduh

>how do you know which one is going to be applied in what you do or how good the code will stay up? Experience. >should I expand into other codes Eventually, but learning too many languages at one time will just confuse you.

Member Avatar for mariocatch
0
168
Member Avatar for bRutal!

The C++ beep is all you get. If you want different notes, you need to go lower (and try to access the hardware, which isn't portable and probably won't work) or go higher (and use a library that lets you produce notes from the sound card rather than the internal …

Member Avatar for bRutal!
0
168
Member Avatar for faisaly
Member Avatar for Narue
0
86
Member Avatar for EnderX

>In an ordinary four-function calculator, are the ( and ) keys available? No, it's strictly a single operation at a time process with the result of the last operation as one of the operands.

Member Avatar for MidiMagic
0
76
Member Avatar for joshSCH
Member Avatar for Dani
0
817
Member Avatar for nse

Eventually you'll realize you ask pointless questions with no answer and start coming up with better ones.

Member Avatar for ~s.o.s~
0
112
Member Avatar for MAI&

Yes, you can use putback: [code] #include <iostream> int main() { char ch; int i; std::cin.get ( ch ); std::cout<<"You read "<< ch <<'\n'; std::cin.putback( ch ); std::cin>> i; std::cout<<"You read "<< i <<'\n'; } [/code]But if you start to use anything more complicated than just this, it would be …

Member Avatar for MAI&
0
143
Member Avatar for Zay

Can you post the definition of queueType? It's hard to test when the code won't compile.

Member Avatar for Zay
0
280
Member Avatar for TylerSBreton

>but how can this be done using 32-bit, since 32-bit is protected by the OS. Access that functionality through the Win32 API, just like everyone else. It's trivial with MASM (as trivial as anything in assembly can be) because the assembler is written with Win32 applications in mind. Check your …

Member Avatar for JeanChenYu
0
679
Member Avatar for complete

The short story is that a union is like a structure except each member shares the memory. The result is that a union takes up less space, but you're also restricted to using a single member at a time.

Member Avatar for Ancient Dragon
0
104
Member Avatar for olams

Include <stack> and <queue>. You can also use a vector or deque as both a stack and a queue at the same time. I'm sure that's not what you meant, but we don't just give away code that smells even a bit like homework.

Member Avatar for olams
0
187
Member Avatar for JohnMG

>entry->set(NAME, AGE, JOB); This is equivalent to: [code] (*entry).set(NAME, AGE, JOB); [/code] The arrow operator dereferences your pointer for you and then grabs the member you specify.

Member Avatar for JohnMG
0
112
Member Avatar for nse

Let's play a game. Why do you think maintenance [B]doesn't[/B] cost more than development?

Member Avatar for nse
0
110
Member Avatar for vicky_dev

You're getting into the realm of needing a makefile. Ask man about the make utility.

Member Avatar for Narue
0
111
Member Avatar for raj1324

The downloaded version of GCC isn't a trial version or an educational version. It's the real thing. And it handles large programs about as well as any other high quality compiler.

Member Avatar for Ancient Dragon
0
98
Member Avatar for MattEvans
Member Avatar for squinx22
Member Avatar for thekashyap
0
80
Member Avatar for radskate360

>for >char name[20]; >use >cin.get(name,19); He's already using std::string. Why are you suggesting that he downgrade to C-style strings? Oh, and you have an off-by-one logic bug. The size argument to get should be 20. Finally, you should recommend getline instead of get, because get has the potentially confusing feature …

Member Avatar for Narue
-1
671
Member Avatar for Dani

[QUOTE]My resolution for the rounded corners dilemma was to go ahead and add an option into the USER CP that allows members to disable rounded corners, the navigation dropdown menu, or both.[/QUOTE] While I appreciate all of the work you do, I need to put on my Narue hat to …

Member Avatar for MidiMagic
0
228
Member Avatar for Dani

[code] #include <stdio.h> int main ( void ) { [COLOR=Blue]printf ( "Good line\n" );[/COLOR] [COLOR=Red]printf ( "Bad line\n" );[/COLOR] [B]printf ( "Bold doesn't stand out at all\n" );[/B] [I]printf ( "Italics don't stand out enough\n" );[/I] [U]printf ( "Underlining makes the code harder to read\n" );[/U] [highlight]printf ( "Highlight only …

Member Avatar for Dani
0
845
Member Avatar for satyanarayanam

>main() int main ( void ), and you need to return an integer. >printf("size=5d\n",res); Format modifiers always start with a %, so you need to say %5d, not 5d. >int sizeOf( void var) You can't have variables of type void. >return((char*)&ptr[1] - (char*)&ptr[0]); This is undefined behavior. You're accessing a …

Member Avatar for Narue
0
161

The End.