Posts
 
Reputation
Joined
Last Seen
Ranked #2K
Strength to Increase Rep
+7
Strength to Decrease Rep
-1
95% Quality Score
Upvotes Received
22
Posts with Upvotes
20
Upvoting Members
18
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
3 Commented Posts
~198.82K People Reached
About Me

Married, two kids, two step-kids, house-owner, non-smoker, GSOH. Will write code for food.

Interests
Life, death, the usual stuff.
Favorite Tags

135 Posted Topics

Member Avatar for samaru
Member Avatar for nathaliecolemadrigal.lopez

Hi Nathaliecole, It's always worth searching DaniWeb to see whether your question has been asked before. I searched on the phrase "number system converter" and it threw up this thread, which may help you to get started: > i would like to create a program that converts a number system …

Member Avatar for Clarar
0
484
Member Avatar for Bob

[B]Intro[/B] This tutorial provides a brief introduction to the random number functions that come as part of the C++ standard library, namely rand() and srand(). [b]rand() and RAND_MAX [/b] The C++ standard library includes a pseudo random number generator for generating random numbers. In order to use it we need …

Member Avatar for JamesCherrill
3
53K
Member Avatar for Bob

In C++ we provide names for the entities we create, the variables, functions and types in our programs. These names, or identifiers, are required to conform to some simple rules. [b]Valid Characters [/b] An identifier must start with a letter and is comprised of a sequence of letters and digits. …

Member Avatar for JamesCherrill
0
1K
Member Avatar for thinkerman

> warning C4700: uninitialized local variable 'n' used line 39 32. int cost[10][10],i,j,k,n,c,visit,visited[10],l,v,count1,vst,p,dup1,dup2; 39. for(i=0;i<n;i++) You're using n in an expression in line 39, for (i=0; i<n; i++), but it hasn't yet been initialised, so it holds an unknown garbage value. When i is compared with n, you're comparing i …

Member Avatar for Aiman_1
0
1K
Member Avatar for Mr Gates

"C++ has GUI features" Well, strictly speaking, C++ has no GUI features whatsoever. It knows nothing about such things, they're simply not part of the C++ language or standard library. If your compiler has GUI features (as many do) they're a platform specific extension. For instance MS VC++ comes with …

Member Avatar for melissad
0
19K
Member Avatar for J&#9788;E

Hi Joe, Fishman has given you some useful code their to get you going. Note that your own code has several basic syntax errors, which indicate that you're probably still at the "hello world" stage. Do you have a C++ book to refer to? If not, can you lay your …

Member Avatar for NANDHINI G
-1
748
Member Avatar for markwiering

Congratulations on having working code. Are you interested in suggestions for possible improvements?

Member Avatar for innocentmeshi
0
479
Member Avatar for jerlisacoleman

> Need help with this and my professor is teaching way too fast. > I really dont understand any of this and my teacher moves to fast to explain things. This is not really a C++ issue, it's a problem you have with your professor. Nothing we do or say …

Member Avatar for NathanOliver
0
363
Member Avatar for markwiering

Hi markwiering, I hear where you're coming from. You're still a fairly raw beginner, so for you, having code that appears to work fine when the expected input is provided probably feels like a good result. And in one sense it is. But you can probably understand where the others …

Member Avatar for markwiering
0
1K
Member Avatar for RonKevin

Your loop terminates when either of two conditions occurs: the user indicates there are no more items to scan in or the number of items has reached the maximum (100). Within the loop, the user enters the barcode and quantity, the number of items is updated, and if the limit …

Member Avatar for RonKevin
0
359
Member Avatar for on93

What part of the task are you having trouble with? Can you write a simple main() function that asks for and stores values for x and n? That'd get you started.

Member Avatar for np complete
0
165
Member Avatar for orar

Hi orar, Looks like you're uncertain about functions at the moment. Here: void main() { float input(); float calulate(); float output(); }; Several problems. The first is that you should remove the word float from the function call, e.g. calculate(); The second is that the function is supposed to return …

Member Avatar for np complete
0
207
Member Avatar for ShEeRMiLiTaNt

Here: *front = entry[i]; this assigns the character at entry[i] to the memory at the address represented by front, but front hasn't been allocated any memory. I suspect what you want is to assign to the pointer the address of the character, like this: front = &entry[i]; The same applies …

Member Avatar for ShEeRMiLiTaNt
0
200
Member Avatar for nathan_drake

Hi Nathan Drake, You know what format input to expect, that's pretty well defined for you, so why not figure out how you intend to store it, then how you're going to read it in. That will get you started, at least.

Member Avatar for SoreComet
0
241
Member Avatar for Bumpehh
Re: dice

In addition to what WaltP said, your compare function isn't working as you expect it to. Take a look at what you're comparing -- DiceTotal and AiDiceTotal -- and check whether this is what you intended.

Member Avatar for Bob
0
163
Member Avatar for addicted
Member Avatar for akashi

You've obviously done quite a lot of work on this already, but I wondered, given that this is C++, whether you'd considered a more object oriented solution (or is that not a possibility for you)? That aside, and given that you've already implemented a fair amount of this yourself, what …

Member Avatar for WaltP
0
327
Member Avatar for orar

Take another look at this line: cin>>a,b,c; Double-check how to handle multiple values with cin.

Member Avatar for np complete
0
282
Member Avatar for kshahnazari

As an aside, C++11 provides an array class which comes with a lot of functionality, if you have a compiler that supports it.

Member Avatar for L7Sqr
0
144
Member Avatar for Sasquadge

Double-check whether this is doing what you expect it to, keeping in mind how many pennies there are in a shilling. temp.shillings = pe / 20; temp.pence = pe % 12;

Member Avatar for Sasquadge
0
1K
Member Avatar for nitin1

It's surprising how much information an interviewer can obtain even from an incorrect answer.

Member Avatar for myk45
0
268
Member Avatar for Binary1010

> Write a function, swapSubtrees, that swaps all of the left and right subtrees of a binary tree. Add this function to the class binaryTreeType and create a program to test this function. This was my assignment this week and I am just at a loss I don't even know …

Member Avatar for Binary1010
0
926
Member Avatar for Yusuke00

Hi Yusuke00, Can you show us what you have so far in the way of code? Thanks

Member Avatar for Bob
0
231
Member Avatar for jdadkn

Hi jdadkn, The policy here is that you can obtain help, but you won't get your homework done for you. The point of homework is usually not to provide the solution but to learn from having created one, so you'll need to have a go at this problem yourself first …

Member Avatar for nitin1
0
107
Member Avatar for XerX

> Well you all have a point guys, we all wanna help each other and it's up to them if they'll just "copy-paste"..- It's not us they're fooling around but theirselves. Right?! They'd also be fooling their instructor. We help by not short-cutting their learning process, which involves them doing …

Member Avatar for Bob
0
637
Member Avatar for nitin1

No specific suggestions, but some general advice: choose a project that really interests you. Motivation is that much greater if you choose something you're interested in, therefore you're much more likely to complete it.

Member Avatar for Bob
0
172
Member Avatar for haqua
Member Avatar for WaltP
0
3K
Member Avatar for anumiqbal

In the absence of specific details about what you're trying to do, cin is a perfectly good way to input words in C++.

Member Avatar for WaltP
0
130
Member Avatar for tspga

Nothing jumps out at me from the code you've posted, but if I've missed something obvious, someone else will surely point it out. Failing that, and because the actual error could be prior to the source line reporting it, could you post the content of tour.h also?

Member Avatar for tspga
0
167
Member Avatar for chris.vargas.773

Hi chris.vargas.773, #include <iomanip> // for setprecision Your syntax for static_cast is incorrect, s/b static_cast<type>(expression)

Member Avatar for Bob
0
313
Member Avatar for madhusudan.srinivasan
Member Avatar for bhavin.chavada

> standart for what? The standard for the C language, which tells us what to expect from a conforming implementation. > Every compiler have own standart. Those aren't standards, they're specific implementations. > some of them also compatible with ANSI but they have own libraries. Like Microsoft, Borland, Watcom,..... These …

Member Avatar for deceptikon
0
146
Member Avatar for mferarri

For keep_window_open(), check out page 53. For error(), check out page 140. As vijayan121 suggests, these are provided in std_lib_facilities.h which can be downloaded from the related site.

Member Avatar for mferarri
0
174
Member Avatar for harris24
Member Avatar for Dev93

> Q1. What is 'sf' ? Is it a class ? As per myk45's post, it's a namespace, in the same way that std is a namespace. If you're not up to speed with namespaces, a quick check in your C++ reference book should tell you what you need to …

Member Avatar for Bob
0
393
Member Avatar for Dev93

What output are you seeing? I don't use SFML, so maybe there's someone better qualified to support you here (or on an SFML-related site). But it looks to me as though you have two threads running, the main thread and a second thread that you launch, and each writes out …

Member Avatar for Ancient Dragon
0
335
Member Avatar for straylight

Could you post the text of the question, exactly as it was provided to you? That way we'll be able to address any issues with your understanding of it, which is where your uncertainty appears to stem from.

Member Avatar for Bob
0
208
Member Avatar for sruthi atluri

Are you looking for someone to hire to write this code for you? I'm currently out of work, so I'll code this for you if you pay me £100, but you'll have to put your money into my Paypal account first. Let me know if you need my Paypal details. …

Member Avatar for nitin1
0
136
Member Avatar for dadon1991

> I have spent hours trying to figure out how to write this program You have the three input values. Looks like you need one or more functions to provide the outputs for display. Are you familiar with writing functions? Are you comfortable with how to store the values produced?

Member Avatar for dadon1991
0
244
Member Avatar for triumphost

Rectangle(int width = 0, int height = 0, int x = 0, int y = 0) : width(width), height(height), x(x), y(y) { x = 500; //does it assign to the x within the class? Does it assign to the parameter x? y = 500; Point(x, y); //which x/y does it …

Member Avatar for mike_2000_17
0
492
Member Avatar for soujanya.bhat.184

Here's what I think your algorithm is: Point to the first character Loop until the end of the string If current char is lower case make char upper case End if Copy character Point to next character Loop until current char is space or end of string If char is …

Member Avatar for soujanya.bhat.184
0
171
Member Avatar for poloblue

Hi poloblue, Your function calls look fine to me, in as much as I don't see an obvious problem with the parameters you're passing, unless there's some way in which the code you posted doesn't represent what you're trying to compile (with the code wrapped in a main() function and …

Member Avatar for WaltP
0
169
Member Avatar for Bob

*From the Visual C++ Team Blog:* Visual Studio Express 2012 for Windows Desktop is now available for download. http://blogs.msdn.com/b/vcblog/archive/2012/09/12/10348456.aspx Additional details and further discussion here: http://blogs.msdn.com/b/visualstudio/archive/2012/09/12/visual-studio-express-2012-for-windows-desktop-is-here.aspx *ETA: post intended for the News Stories section -- if the Mods could kindly sort that for me?*

0
104
Member Avatar for TimLloyd31

Hi Tim, The C++ language provides support for sorting and for selecting the maximum value, which makes this really easy. If Dev C++ doesn't come with that support, or if this is homework and you're expected to roll your own, you'll need to sort the values yourself and find the …

Member Avatar for np complete
0
2K
Member Avatar for Vasthor
Member Avatar for silvercats

Hi silvercats, That other thread includes some fairly recent posts about some fairly recent books, so it's worth a read. You can check out the books mentioned on Amazon, use the preview to check whether the content and style looks right for you, for where you're coming to C++ from. …

Member Avatar for arkoenig
0
354
Member Avatar for lim9I

Hi lim9I, When you've fixed the above by bringing main() outside of the class, you might want to just check out the following code within serve() to see if it's doing what you're expecting it to do: if(!empty()) { (num + queue[head]); (head++); return (num); } It's close, but there …

Member Avatar for rubberman
0
228
Member Avatar for satishchavan170

Hi satishchavan170, This Wikipedia article will get you started on the concepts of inheritance: http://en.wikipedia.org/wiki/Inheritance_%28computer_science%29 but I'd advise you to get your hands on a good reference book that introduces OO concepts. Do you have any specific questions about inheritance with respect to C++?

Member Avatar for rubberman
-1
79
Member Avatar for queos

Hi queos, It looks as though you haven't quite understood about pass-by-reference and pass-by-value yet. Taking this function, for example: float getSales(float sales1, float sales2, float sales3, float sales4) { cout << "enter sales figure until 4: "<<endl; cin >>sales1 >>sales2 >>sales3 >>sales4; cout <<endl; return (sales1, sales2, sales3, sales4); …

Member Avatar for Bob
0
133

The End.