5,676 Posted Topics

Member Avatar for Satya1994

> Which is the best compiler for C++ development for latest versions of OS like the 64 bit windows? Best? What makes you think there's a best? If there was a best, there'd only be one choice. > The DEV C++ compiler is a good option but I find it …

Member Avatar for DavidB
0
295
Member Avatar for np complete

> And Labdabeta, what do you mean by arbitrary arithmetic library ? Bad choice of words. He means a large-number arithmetic library? *Arbitrary* is not correct. You want to pick a package with care.

Member Avatar for TrustyTony
0
243
Member Avatar for Thornx1

First things first: >I am not very fluent in c++ Get fluent in C++. Put the bots on a back burner, you're not even ready for the game yet. 1) Learn C++ extremely well. 2) When you have learned C++, write a few *simple* games. 3) When you're ready, start …

Member Avatar for WaltP
0
231
Member Avatar for milindchawre
Member Avatar for kovacsakos

If people would stop responding to these posts, we could actually do something about them.

Member Avatar for WaltP
0
127
Member Avatar for SHASHWATH
Member Avatar for ahmed.alsalihi.3

I'm confused. You enter your number into a string named **string** then start processing a variable named **r**. Where did **r** come from? How do you do math on a string? First thing's first: Write down the steps you take to translate a decimal value into a binary value -- …

Member Avatar for WaltP
0
258
Member Avatar for I_m_rude

Start over. I can't understand what you're doing at all. I've never seen such a complicated fibo program in my life! Most of them are about 5 lines of code.

Member Avatar for I_m_rude
0
123
Member Avatar for np complete
Member Avatar for deceptikon
0
218
Member Avatar for piero.costa
Member Avatar for ramadan10

Why do you need to PM anyone? Getting help is done by posting in the forums. Read the Member Rules.

Member Avatar for WaltP
0
132
Member Avatar for ayoub

2 resurrections of a 7 year old thread with "give me the answer" posts show this this thread is a lazy-student magnet. Closed

Member Avatar for WaltP
0
2K
Member Avatar for userIT

> Any tips on how to solve this? Not without a better description. There is no explanation what **r** contains. You didn't tell us but **a** *seems* to contain your 4 random numbers. The indexes into **zero** and **one** -- are those just guesses? It there any reason those numbers …

Member Avatar for userIT
0
184
Member Avatar for dinohead

I already answered this in the other thread in which you asked the same question.

Member Avatar for WaltP
0
114
Member Avatar for keryll
Member Avatar for vikingsheepman
Member Avatar for vikingsheepman
0
267
Member Avatar for I_m_rude

Now you're begging and screaming at us? Maybe you should do something else...

Member Avatar for I_m_rude
0
99
Member Avatar for vikrantiitr

There is no polynomial. It a simple addition or multiplication problem. Convert A to int. Store operator. Convert B to int. Convert Z to int. Calculate A operator B. Compare with Z. Easy-peasy.

Member Avatar for vikrantiitr
0
132
Member Avatar for Synapomorphy

> bookTitle[SIZE] Every time you specify `bookTitle[SIZE]` you are specifying the memory *just past* your **bookTitle** array. Haven't you been taught about array indecies yet? `while (!filePath.eof()){` -- [See this](http://www.gidnetwork.com/b-58.html) `for(i = 0; i < count; i++){` -- Do you actually know the value of **count**?

Member Avatar for WaltP
0
85
Member Avatar for sellemaster

1) Dice **is** the plural. *Dices* is chopping vegetables into small cubes. 2) Reread your information about `srand()`. Is it supposed to be where you have it?

Member Avatar for sellemaster
0
161
Member Avatar for dinohead

You are asking two different things expecting to mash them together. Also your initial expectation is wrong.... **%x** is for numbers, not characters. **unsigned char \*s** is a *pointer* to character, but it doesn't actually point to one. It points somewhere but no one knows where. **4200FF** would be 3 …

Member Avatar for rithish
0
136
Member Avatar for 111100/11000
Member Avatar for alaa sam

>here is the insert function I will consider your notes but what is the problem with my code?? You tell us what the problem is. Reading code is hard enough without searching for some unknown error.

Member Avatar for alaa sam
0
213
Member Avatar for im abcd

> ((-b) + sqrt(b*b-4*a*c)) / (2*a) See that **/**? Don't do that. Assign numerator and denominator to separate variables and print them out. num = ((-b) + sqrt(b*b-4*a*c)) den = (2*a)

Member Avatar for im abcd
0
424
Member Avatar for dawsonrose

First, create the structure and include all the grades (and all the data) from the file.\* Create the read function to read a student record. Next create a write function that displays the data for 1 student. Write the main function to: 1) read all students 2) display all students …

Member Avatar for WaltP
0
787
Member Avatar for jere.saw

Write a program and find out rather than waiting 7 hours for an answer.

Member Avatar for WaltP
0
53
Member Avatar for powerdink

I must have missed something. Where is the description of the problem you are having? Is it hidden somewhere? Or are we supposed to read and understand 300 lines of code with no idea what problem we are looking for? I have better things to do. Where's my TV remote...?

Member Avatar for Brandon5122
0
6K
Member Avatar for Carpetfizz

You use setter and getter methods: class testClass { private: int value; public: int GetValue() { return value; } int SetValue(int v) { value = v; } }; This way the class has total control of the data for safety, but other functions can still access the value.

Member Avatar for Carpetfizz
0
315
Member Avatar for tensity

It seems to me that the error "*no instance of overloaded function*" means you have not defined the proper namespace at the beginning of the program. This could cause the 3-parameter `getline()` to be unknown. Also, [see this](http://www.gidnetwork.com/b-58.html) about reading and looping (`feof()` is identical to your (.eofbit`)

Member Avatar for tensity
0
217
Member Avatar for Graphix

In addition, if all you want to do is test if switching is better, all you really need is: Loop: get random number 0-2 ; 1 of possible 3 'doors' chosen if number = 0 ; 0 is defined as the good door switchNo = switchNo + 1 ; count …

Member Avatar for WaltP
0
651
Member Avatar for manishanibhwani
Member Avatar for shanki himanshu

> why root is not NULL? or how can i make it to NULL? Why do you want it to be NULL? You just `malloc`ed some memory and put the address of it into *root*. Do you really want to loose that memory causing a memory leek?

Member Avatar for I_m_rude
-1
158
Member Avatar for matt.malone.921

Get your terms straight. You don't "*create the file*" to store it in an array. You open and read an *existing* file to store it in an array. So in detail (excruciating detail) explain the first part of the program you need help with, and show us what you've tried. …

Member Avatar for Vish0203
-1
160
Member Avatar for titusnainggolan

> yes, you'll get same value if you use double. I really wish people would learn the details before regurgitating bad information all over these forums. No, double will not correct the problem. Float and double both have the same inexactness problem, just at different levels. It cannot be *solved*. …

Member Avatar for WaltP
0
376
Member Avatar for gerbil

If you've ever written C/C++, it's no different than writing a string. You just have to remember that \* is also escaped... In C: it's `http:\\\\*`, in markdown it's `http:\\\\\*`. So what's the big deal? ;-)

Member Avatar for gerbil
0
186
Member Avatar for Perry31
Member Avatar for chaacoali

When you copied the string into *str2*, you neglected to terminate the string with '\0'. So those ? characters were just what happened to be in memory after your string. The `printf()` printed the string until it found a '\0' -- in this case it was close. In other cases …

Member Avatar for chaacoali
0
131
Member Avatar for aabbccbryanmark

> Can you not just take some code, then go onto different forums (Java, C++) etc.. and ask what the code is, You shouldn't. You should post in a more generic forum (Computer Science) so you post only once. Also, since you don't know what language it is, posting Perl …

Member Avatar for WaltP
0
301
Member Avatar for gem.gonzales.9

> whats wrong in my codes 1) `main()` is an INT function 2) `define`ing printf and scanf makes the code difficult to follow and is unnecessarily confusing 3) As **pyTony** mentions, you need to [format your code](http://www.gidnetwork.com/b-38.html) properly. 4) Use a standard function (`getchar()`) instead of the nonstandard `getch()`. That's …

Member Avatar for Vish0203
0
116
Member Avatar for rithish

> iam not a highly efficient programmer .iam still in learning the beasics. So **learn the basics!!!!** Stop trying to understand how to build an airplane when you barely understand how to ride a bike. You clearly don't understand pointers well yet. Why the hell are you trying to deal …

Member Avatar for WaltP
0
516
Member Avatar for SHASHWATH

> Context, it's important. So is formatting, since your code is unreadable without it...

Member Avatar for WaltP
0
209
Member Avatar for rithish

**MAIN IS NOT A VOID FUNCTION! STOP USING VOID!!!** If you want to program correctly, **USE THE HELP WE'VE GIVEN YOU!!!**

Member Avatar for Schol-R-LEA
0
122
Member Avatar for Marcusflint

Why should it be? Remove MAX and put the macro code directly in your code and see what happens. Post the results.

Member Avatar for rithish
0
173
Member Avatar for RonKevin

Try printing out avarything you read in as soon as you read it. Can you use STRINGs rather than CHARs? If not, make your CHAR array larger -- say [20]. > ...oh my, Channelling George Takai, I see... ;-)

Member Avatar for RonKevin
0
569
Member Avatar for rithish

Copy and paste the errors, don't post a screenshot. **Explain** the problem -- don't make us try to figure it out. You cannot nest structures.

Member Avatar for rithish
-1
162
Member Avatar for ZeQuia

So what does it do wrong? To get help you need to post details, not just a vague "it doesn't work" message. We need to know **how** it fails in order to understand what "doesn't work" means.

Member Avatar for teachMyself
0
131
Member Avatar for DavidB

> For example, instead of writing a polynomial as follows: > > `a0*x^0 + a1*x^1 + a2*x^2 + a3*x^3 + . . .` > > it would have been nice to write it with the proper subscripts and superscripts. I tried to use HTML code (<sub> and <sup>), but that …

Member Avatar for WaltP
0
127
Member Avatar for teachMyself

In addition to what **The Dragon** said: 1) Never use `conio.h` and `getch()` if at all possible. They are non-standard and are only defined in a couple compilers. Use a standard input function. In your case I understand why you used it, but in general, *avoid `getch()`* 2) Line up …

Member Avatar for WaltP
0
271
Member Avatar for macla

If your sort key is short, you can loop to 1a) remember line position (ftell) 1b) read line 1c) extract the key put both key & position in a structure array Now sort the structure Read each line from the the line position (fseek) and write the sorted file. I …

Member Avatar for WaltP
0
472
Member Avatar for <HHH>

The End.