jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster

Are you spamming up the boards, AD? It was pretty funny, though I never have to go through all of that effort to get hit by women with purses. It just comes naturally.

jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster

How large of a box do you need in which to write "crap"? ;)

jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster

Posters with such disregard for order probably won't read the sticky, either. I feel your pain, but the only solution to this one is mild electric shocks through the keyboard.

jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster

Votes need to be spaced apart by 10(?) seconds. If you do it any more rapidly than that, you have to refresh the page. This is done to prevent scripts, bots, your sister, etc., from rapidly down or upvoting posts.

jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster

sorrrrrrrrry!

It's my bad, I was a poor role model when I was trying to be a smartazz.

Don't worry about WaltP, as long as you don't walk on his lawn he won't press charges.

mitrmkar commented: Mmm, are you sure about WaltP?? +0
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster

I'm currently working on recoding all of DaniWeb from scratch

Editing for high rep users? ;) Just kidding, I know when to quit.

jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster

Hehe you wouldnt want to know her

True. Most especially not in a dark alley.

please you can write to me (marcyalbert@yahoo.com)

If there's any grain of truth to that email address, it's probably a guy named Albert Marcy instead of a woman named Marcy Albert.

jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster

I got two of 'em! (PMs) I knew one day a random woman would find my profile on DaniWeb attractive! Mom was right, she would like me for me.

I guess better to get a PM from SpamGirl than from WaltP...

jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster

Ok, you've had your fun at my expense. I'm solving this. :)

Oh, my fun's just begun, Capteiniaid Cymru. ;)

jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster

All I know is that Yankee Doodle came to town riding on a pony. My guess is, it was a big pony, or he was a small man. I don't know about Washington's arrangements.

I've lost 10 minutes of my life asking myself some pretty pointless questions.

Whatever it takes to get you to stop posting... ;)

jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster

I would really like us to have a whole new range of digits from next year

That doesn't buy you anything. Well, it helps with ad revenue, I suppose, but what kind of site would it be if that increase in numbers consisted of 80,000 homework assignments?

jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster

I think regex is part of boost libraries.

You're completely correct about that, but I think the version that the OP is expecting is the TR1 version put out with the last VS.

jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster

Do you have Service Pack 1 installed? Otherwise, try reinstalling VS.

jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster

Get rid of lines 10-13, you can't have two mains.

Change line 15 to int main() as per the standard.

jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster

The best way to seek help is to come with code (which you have done) and have specific questions about particular sections of it. Saying "I need to add a receipt portion" dumps the responsibility into our lap.

The first thing you don't need are these WinExec statements. You have some loop structure in there, so employ it when you need to send the user through the code for another round.

There's a pattern in your case statements. They are all doing the same thing short of the cake type being different. Make one statement that outputs the type of cake and then leads the user through the prompts. Get rid of that switch entirely.

The key to being able to do the receipt is keeping track of what the user has purchased. Hint, use an array of fixed size to hold the numbers of the items the user orders (and the total number they have ordered), then dump out the array and use kinds to label the output.

Get small pieces of it working before you try to plow through the whole thing at once, it will make your life much easier.

jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster

I'm so stupid sometimes.

Nah, it's just a little factoid about syntax, and now you know!

jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster

Just omit the break in the middle. Switch statements "fall through" until they reach a break;

case 'a':
case 'A': //do stuff here
break;
FriXionX commented: fast help, thanks. +1
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster

bad post

bad post(again)

There is an edit button(under your username and avatar) <<------------------------------<< that works for up to 30 minutes after you've made the post.

jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster

NubTruck's approach is correct if you have a Win32API application. I was asking about that because if you were using a different GUI API, the approach would be different.

If you are using the Express Edition of Visual Studio, it is "missing" a resource editor (resources being all the "baggage" your application can carry, icons, bitmaps, etc.). You have to generate your own resource scripts to be fed into the resource compiler that does come with the EE.

Something like http://www.resedit.net/ (not affiliated with this product) gives you back that resource editing. Have a look at that. Regardless, I would take Nubtruck's advice and take a few steps back in that tutorial to see where you first stopped understanding. If you are going to get into this sort of thing, the fundamentals are important.

jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster

Does your program run in a window, or is it a command line program?

jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster

I used Qt_SDK_Windows_online_v1_1_en . There may be an updated version by now.

A brief runthrough of what I think I selected for install:

Uncheck APIs (counterintuitive, but unless you're doing mobile development, not needed)

In Documentation: Get rid of Qt Mobility and Symbian (if you're just doing PC development)

Miscellaneous: Check Mingw 4.4 (Examples and sources if you need them)
Development tools: Desktop Qt: this is the meat of it, select Qt 4.7.3 (or latest), check the third option down off of that to get the mingw version (no need to take the Visual Studio version if you don't need it, that will save you a ton of disk space)

Uncheck Maemo Toolchain (unless you need these compilers, but they are also for mobile development -- I think it puts all of these on the path, which gums up trying to use the regular compiler)

Try it with that, and babysit the error messages, as if you have a firewall/antivirus all of the command line programs it's running in the background will drive that AV program nuts (and Qt is a reputable product), so you may need to turn it off. If it doesn't take a long time to install, something is wrong, because this is a mammoth.

sDJh commented: thank you! +6
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster

If you look below the signature editing box in the control panel, there's a box

Signature Permissions
Allow Basic BB Code Yes
Allow Color BB Code No
Allow Size BB Code No
<SNIP>
Allow Smilies No
Can Upload Images for Signature No   <----****----
Can Upload Animated GIF for Signature No

This lists all of the permissions for signatures for your account. I believe pretty much everyone's says no for images in signature (admins may be the exception, but I don't recall any having an image for a signature).

jingda commented: Clear as mud;) +0
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster

There's a lot of stuff included in the default installation that's for embedded systems. I remember Qt getting confused between the embedded compilers and the actual gcc installation, so I removed the embedded ones (I think this was mainly an issue in QtCreator). I also seem to remember a permissions issue being a problem (and having to turn off my security program for the duration of the install). If either of those two ring a bell, you may want to reinstall.

I don't know anything about backwards compatibility issues, but I would trust that the version of mingw that it comes with can handle all the switches that their "make" tries to throw at it (and there's a ton, if you do a verbose run of the make). I don't know how well the different versions get along.

Try that out and see if it improves things.

jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster

What is your question?

jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster

It looks like you have somewhere around Qt 4.4. There is now Qt 4.7 which comes with mingw 4.5, which is much more up to date. It could be a corrupt installation of mingw, so reinstalling your version might help, but try the latest version.

jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster

Not the chief concern, but take off the loop in 26, there's no need to output the same average 10 times.

Also, in C++ (and C99) you can declare the loop variable within the for loop

for (int k = 0;k<10;k++)
{
   //k is available here
}
//k does not exist out here

You're missing your closing brace, but I think that might have been a copy/paste error.

How are you running your program? Try running it at a prompt. I was able to get the correct result.

jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster

Get rid of lines 4-7. You can't have 2 mains in your program. It can't find the .exe file to start it because the code is not compiling successfully. Monitor the messages at the bottom of the Visual C++ screen to see the errors in your compilation. Double click on them to bring you to the line that has the error.

This is in no way your fault, Microsoft is trying to generalize main to be able to handle different encodings, and it's confusing as all get out when you're first getting started. :)

jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster

What are the error messages?

(it looks like you're missing the std:: qualification on cout, endl etc. The best way to deal with that in your case is to put

using std::cout;
using std::endl;
using std::cin;

at the top and leaving the rest of the code alone. Note that you could use a blanket using namespace std; at the top, but that's a bad habit to get into, as it pollutes your namespace, rendering all of the hundreds of names housed in std:: unusable for anything else, or worse, causing conflict with your functions and variables of the same name.

jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster

Like I said, I don't know Objective-*. If that's a "nuance", so be it. :)

Not trying to purport any knowledge on my part, as I've only messed around with it a few times. :)

This is not Objective-C forum.

There are a handful of questions on Objective-C that were deemed to be on topic (ipso facto) in the C forum, so this isn't too much of a stretch.

jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster

I remember something about the Objective-C++ compiler not including glibc++ by default as g++ does.

Try including the argument -lstdC++ (along with all of the appropriate switches for the other libraries).

@Fbody #import does work on Objective-C, so I'm not sure what the nuances are for Objective-C++.

jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster

Ivor Horton's is pretty good. It covers a lot of other material, but he teaches some C++/CLI (the "dialect" of C++ required to do programming on the CLR) http://www.amazon.com/Ivor-Hortons-Beginning-Visual-Programmer/dp/0470500883

As an added bonus, it has some information about some of the feature in the newly approved standard (the book came out a while ago, so it's based on what was known at that point).

jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster

The static server issue was fixed yesterday (if not the day before yesterday).

Does seem to be much better. I haven't used the site enough today to tell for sure. I'll mark this as solved for now, but feel free to contribute any woes.

jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster

Beside javascript, can spam cause the website to load smaller?

Spam from what?

jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster

Is the problem with certain browsers? I use Chrome and Windows 7 now and I have no problems like that at all.

I'm on Chrome and Windows 7, too. It's intermittent for me, which is why I was initially assuming it was content delivery or ads that were holding it up.

jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster

What are your requirements, and how would you define "best"?

Take a look through http://en.wikipedia.org/wiki/List_of_widget_toolkits#Based_on_C_or_C.2B.2B_.28including_bindings_to_other_languages.29 and check out, e.g., Qt and wxWidgets. Both are very popular. There's always the traditional MFC route, or using the raw Win32 API.

jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster

can anybody teach me write this programme in c++???

Yes. Provided you come to the table with something more than a copy/paste job of your assignment. What have you tried? Which part is stumping you? Can you put together a program that does some of the functions? etc.

jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster

I've been seeing the same thing for quite a few days. Certain pages do not completely load and the cursor hourglass keeps spinning.

Phew, that's better than the raised eyebrows I usually get :)

It may have been longer than that for me too, but it's become more noticeable in the last day and a half.

jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster

Over the past day and a half or so, I've had multiple occasions in which the page "stalls" before loading all the way. The text is all there, but the "bullseye"/solid purple icons next to the posts, and all of the FB/Twitter regalia take a few seconds to come up.

It seems like it's stalling on either platform.twitter.com or www.google-analytics.com. I imagine you don't have much control over ad servers, etc., but I'll mention it just in case there's another problem.

I'm on Chrome 13.0.782.112, and all other sites are loading as expected.

jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster

have to conform to strict data structure definitions

If your abstraction is strictly a LIFO stack, then the code should adhere to that. If your abstraction is the stack with the features you've described, then sure, have a party. It's whether you call a duck a duck. Once you propose a queue with a magic viewing window in the middle, you're not really after a queue anymore.

I do, however, understand the practicality of what you are saying.

Forth is a good example

I've never braved Forth :) I'm still stuck on Thurd.

jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster

If you think about the abstraction of the data structure, it doesn't make sense to. It is a last in/first out (LIFO) system. If you need a queue or even a deque, then you should use those data structures instead.

jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster

http://www.cplusplus.com/doc/tutorial/files/ is a nice, straightforward tutorial on files. The only downside is it doesn't go very deep, but once you've completed it, you will have some good search terms for Google.

jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster

If you are not at that level yet, start simple.

-Can you have the user enter a line of text? If not, find out how via Google.
-If the user makes a mistake, can you have them show where in the line the change needs to happen? Example, change all of the letter 'e' characters to a letter 'a'. If you don't know how to do this, find out how via Google.
-Can you save that line out to a file? Can you read it back in from a file? If not, find tutorials on how to do that.

No one started out writing Emacs or Vi/Vim all in one sitting. Those are two examples of editors that are open source (but probably to big for you to emulate), but there are countless others.

jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster

relative information on recent developed softwares

Code that my aunts and uncles developed?

All kidding aside, you are going to have to be a lot more specific if anyone is going to be able to answer that question. Information relative to what? What types of software?

jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster

Chars are really integers (see any ASCII table).

char grade = 'A';
grade++;
std::cout<<grade;  //'B'

but this requires you to go up when you are going down in grades, and the skip between D and F would require some extra logic.
What would be even easier, though, is to make it a case statement

switch(grade)
{
    case 'A': grade = 'B';
              break;
   //similar for case 'B'
   //similar for case 'C'
   //cases for 'D' and 'F' are different
   default: //what do we do if it's none of these letters
}
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster

I was assuming since you were asking about tabs that you had a tab control on your form. If for some reason you don't have one, drag one out of the Toolbox (may be hidden with only a small bit that says Toolbox on it), and place it on your form. Then do the steps I outlined above.

jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster

Select the tab control, go to the properties window (usually on the right side, but you may need to go to View/Other Windows/Properties Window), go to the Multiline property and change it to True .

jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster

Do you have a team? People experienced doing that sort of program? A good database of virus binaries to draw from? A marketing unit to lure customers from the big named products?

peter_budo commented: Nope only big dreamy eyes :) +16
kvprajapati commented: :) +15
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster

That is a lot of code to go through. You should whittle it down to compilable snippets of the source files in question.

jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster

Read Wikipedia's explanation of encapsulation to see some of the philosophy behind it.

You could certainly make it public, but what if you want people using your classes not to have to muck around with those things. As an example, what if you wanted to change the way you stored the member variables? If they are private, all you'd have to do is modify getdim() and you'd be good to go. Everyone could access the values like they always did. If the member variables were public, you'd need to modify each time they are used in the code.

jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster

getdim() is declared as public in the base class, and the inheritance is public, so the derived classes will have access to this method (as public).

This method retrieves the values of the dim1 and dim2 variables by reference. In triangle and rectangle , the values of d1 and d2 are passed into the method, and are assigned the values of dim1 and dim2 respectively.