Ok. So I have been researching and compiling info for the past 15 hrs about this. Hope someone can have some helpful input.

What I am trying to do is create a program to use for my construction business to help with estimates of a job to make things easier, where I input certain numbers in certain fields and they generate me an answer using math formulas.

For example, Concrete yardage formula= (L*W*D)/27, with D being default 0.33 and L W D being in feet. It is the correct formula but how do I compile it into a program to do it for me without using a calculator? Along with formulas for estimating the cost of material, labor charge, etc. But I'll worry about that later.

I have been watching video after video after video, and reading all kinds of articles and have yet to find something of this perspective to help me.

Most of what I find are in Visual C++ which I have, but they are all totally different than what I've been working with. Below is a screenshot of what I've got so far, just need help with the "guts" of it I guess.
http://i41.tinypic.com/vew4d2.jpg

Again any help would be greatly appreciated!! Thanks!!

Edited 6 Years Ago by antball06: n/a

To be honest, I think Excel would be better than trying to learn C/C++ to do this. It's made for on-the-fly computations. It also makes it very simple to compare possibilities.

I might be very wrong, but from your post, i can understand that your c++ skill isn't that much.
Why don't you try to make the program console based?
It's much easier and can do what you want just as good (which is calculating numbers using different parameters)

Using cin and cout is alot easier

To be honest, I think Excel would be better than trying to learn C/C++ to do this. It's made for on-the-fly computations. It also makes it very simple to compare possibilities.

Yes, very true! But I don't like Excel. Also, I think IF I can get this figured out, or maybe another program, it will be much more useful and easier than an Excel format due to it having tabs for the different job fields, etc. Plus I've always been highly interested in trying out programming but no time for school. So my learning relies on the internet :/

I pretty much now have all of the visual aspects (using drag/drop from toolbox) set up just the way I want. Now I just have to figure out how to input the formula's to calculate the input numbers and send the answer to the right "box". It's rather complicated for a beginner like me. If noone can help, maybe I'll eventually be able to read enough to understand it :P It's just so much easier for me to see visually, or follow a simple tutorial showing the basic steps of it but Ive yet to find one of this difficulty.

Thanks for the advice tho

I might be very wrong, but from your post, i can understand that your c++ skill isn't that much.
Why don't you try to make the program console based?
It's much easier and can do what you want just as good (which is calculating numbers using different parameters)

Using cin and cout is alot easier

You're not wrong at all Tigran! I am a total noob when it comes to C++. If there is other, easier programs I could use to create a program, I'm all about it!! BUT, I'd like for it to look like an actual program created specifically for the purpose stated with custom visual aspects :) and also a settings/preferences tab to change the input numbers of some hidden formula's if they need to be changed. EX. the rate of labor for pouring concrete may rise/fall and have to adjust that rate. Also, to be able to install it on multiple computer, but I will worry about that later on!

This is a total new experience for me and I look forward to learning all aspects of it!!

If noone can help me, I apologize for littering the forum, and I will just continue to read on til I can hopefully find information for this.

Thanks!!

In your construction business, if you hire me and all I can do is drive a nail, would you have me pouring foundations, cutting moulding, using a rebar gun, and installing windows on my own the first week?

This is what you are trying to do. You don't have the background to create a simple program let alone one this complicated using such advanced techniques.

I understand your desire, but start with basic programming, then work up to using windowing. Basic programming is hard enough without trying to learn everything all at once. And you will hate what you write by learning everything in one shot.

But if you want to continue on this path, devour tutorials more than videos.

Edited 6 Years Ago by WaltP: n/a

In your construction business, if you hire me and all I can do is drive a nail, would you have me pouring foundations, cutting moulding, using a rebar gun, and installing windows on my own the first week?

This is what you are trying to do. You don't have the background to create a simple program let alone one this complicated using such advanced techniques.

I understand your desire, but start with basic programming, then work up to using windowing. Basic programming is hard enough without trying to learn everything all at once. And you will hate what you write by learning everything in one shot.

But if you want to continue on this path, devour tutorials more than videos.

Perfect point! I understand what you are saying but I understand the beginner basics. Yes, C++ is a rather new but with some html in my background it makes it a little easier to understand. I have all my "cheat notes" setting aside to me and can create all the small "programs" seen and illustrated in tutorials, etc. I have done it with the "brick formula" which is rather easy because it is not as complicated of a formula as the concrete. The basic;s aren't so hard. But when it comes to "windowed" as you stated, I guess it's way outta my league as there isn't a single tutorial out there I have yet to find to help with inputting information in a blank field and formulating fields to answer in another field etc. Pretty complicated stuff.. Brainrackin me just thinkin about it!! Anyways, off to read more on the basics and hope I run into a little info to help me along the way... Thanks for all the info!!

What WaltP says is true, programming windowed applications, (I like to call it programming using Win32 API) is hard in C++.

If all you want are those calculations, then I really suggest you give Visual Basic a try.
They say it's really simple (haven't used it myself though)
But for the kind of program you're trying to make, visual basic is sufficient.

EDIT: Visual basic also has a visual interface (in Visual studio) where you can drag and drop stuff

Edited 6 Years Ago by Tigran: n/a

What WaltP says is true, programming windowed applications, (I like to call it programming using Win32 API) is hard in C++.

[opinion -- read with a grain of salt]
Win32 API is different than what he's using though. He's using full blown windowing -- what came out of MFC I believe. APIs are lower level.
[/opinion -- corrections accepted]

If all you want are those calculations, then I really suggest you give Visual Basic a try.
They say it's really simple (haven't used it myself though)
But for the kind of program you're trying to make, visual basic is sufficient.
EDIT: Visual basic also has a visual interface (in Visual studio) where you can drag and drop stuff

I agree. It is much simpler than C/C++. Once you have the forms designed you can drop in the code you need at each object. in C++ you have to really understand the low level interface details. VB still isn't trivial, but it might make the programming much easier. I still use it today.

I haven't used this myself, but here's Visual Basic Express, a free download.

Quick ?...

How would I convert this formula into basic code for Visual Basic where L and W are entered into textbox manually and then calculates and puts the answer in the Total textbox???? Ive searched many many videos and done alot of reading and not came across this once.. I think if i can get a start on this I can take off from there.

(Length*Width*Depth)/27=Total whereas Depth = 0.33

Add 3 textboxes (L, W, TOTAL) and a button to the form. In the button click event
- get the values in two boxes
- do your calculation
- put the total in the third box.

You seem to be relying on videos too much. Non-video tutorials will help you find specifics much faster. They also give you code you can test. I've never gotten code from a video.

Ok so I tried it with the basic. Just did a rough, quick example to figure it out but still cant. Dunno what Ive done wrong.

Ive tried about 5 diff ways with still no output in the total field when clicking "Estimate". There is not 1 single article out there talking about taking inputs from textbox and plugging them into an equation to solve the problem.

Do I dim as string? Do I dim as integer? It wont seem to let me do anything else.. Reports an error :/

L should = textboxL (the length input)
W should = textboxW (the width input)
D should = 0.33
with the result being divided by 27
which should = textboxT (total yards output result)
Refer back to the link in the OP for a better visual.

Any help with that info? Maybe help a little with the code?

20 hrs of reading and searching and still nothing about (input*input*0.33)/27=output

P.S. I appreciate all the help! I don't know if I'm being misunderstood or if I am not comprehending. Its very aggravating!! If I can just get 1 example I think I can plug and play from there!

I FIGURED IT OUT!!! Now to move on to the more complex ones!! Thanks anyways guys!!

I FIGURED IT OUT!!! Now to move on to the more complex ones!! Thanks anyways guys!!

Yay!!! Just take it somewhat slow. Remember the old programmer's proverb:
"If builders built buildings the way programmers wrote programs, the first woodpecker to come along could destroy civilization."

If you are not trying to learn c++ and just want a program to help you, I suggest writing it in Visual Basic using a windows form. Much more simple and easier to "Construct"(pun intended).

(Maybe I shoulda read more of the posts before I put this here...)

[edit - WaltP]Yes, you should have :icon_wink:[/edit]

Edited 6 Years Ago by WaltP: n/a

This article has been dead for over six months. Start a new discussion instead.