1,362 Posted Topics

Member Avatar for GDICommander

That error generally means that at some point your program wrote to a location outside the array's allocated memory. You see the error at the delete statement because the VS debugger gives these warnings at program exit. Check your array access carefully for any out of bounds writing.

Member Avatar for GDICommander
0
116
Member Avatar for k59smooth

Each item in double quotes is actually two characters, the letter you see and a null terminator ( '\0' ). Just use single quotes around each character, like [icode]char Letters[26] = {'a', 'b', 'c',.....[/icode] Please don't start new threads when you're really adding to/correcting a previous one. You could have …

Member Avatar for Nick Evan
0
84
Member Avatar for k59smooth

[QUOTE=Rashakil Fol;739363]Get a better compiler. And post a real code example.[/QUOTE] His compiler's fine. You're really living up to your the interests you list in your profile tonight, aren't you?

Member Avatar for Nick Evan
0
287
Member Avatar for madmaxx350

The point is, show the code you've written, and if you have some idea of what part's giving you problems, point that out. Then you'll find many people here will assist you in solving your problem.

Member Avatar for vmanes
0
73
Member Avatar for 666kennedy

[QUOTE=mrboolf;738921]well you could use loops, something like <snip> [/QUOTE] Arrays and loops go together like peanut butter and jelly. Good things separately, great thing together.

Member Avatar for mrboolf
0
114
Member Avatar for The Dude

Read the intel, scan the whole field. I think playing full screen mode makes for more accurate shooting. 83% on level one, that's where I quit.

Member Avatar for jbennet
0
41
Member Avatar for red10975

Please read the sticky posts at the top of this forum. In short, we don't do your work for you. Write what you can, ask questions about problems you encounter. Here's two hints to get you going. You'll want to write a separate factorial function (many examples abound) and you'll …

Member Avatar for vmanes
0
176
Member Avatar for number87

In a general sense, your cargo class could have a display method, and the aircraft's display method would simply call that for each cargo item in the list.

Member Avatar for minas1
0
122
Member Avatar for The Dude

It's information that is often available directly from the state official websites. In this case, I find it does not agree with my state's information. You must also watch out for sites like this that are total fabrications. I've seen one that generates totally different names and locations every time …

Member Avatar for The Dude
0
169
Member Avatar for Arctic wolf

Yes, you get clock functionality from library <ctime> (or maybe it's still <time.h> in VC++ 6) See [URL="http://www.cplusplus.com/reference/clibrary/ctime/"]here [/URL]for a quick reference. Check your MSDN help information in VC++ for what's actually supported in that compiler. Consider moving into the 21st century with newer versions. VC++ 2008 Express is a …

Member Avatar for Arctic wolf
0
654
Member Avatar for ioclick

Do a google search on "proper sitting" and you'll find a wealth of advice. Primarily chair height, seat angle, support for feet are the big concerns. If your doc is not concerned over "shooting pains" I'd get another doc! These could be symptoms of something serious.

Member Avatar for GrimJack
0
150
Member Avatar for Kainan54

[code] #include <iostream> using namespace std; [/code] You got this correct? VC++ 2005 and 2008 should work just fine in Vista.

Member Avatar for Kainan54
0
124
Member Avatar for The Dude

[QUOTE=GrimJack;736391]What a load of crap! Someone comes along who does not try to lead by fear but by a vision of [B]what this country was founded on[/B] and the wingnuts go wild. Fear and Fascism lost the election, get over it and get behind our president.[/QUOTE] "Seven years before Barack …

Member Avatar for GrimJack
0
180
Member Avatar for d1s_0n3_guy

Yes, you've collected all the tools you'll need. Now put them together in some actual code. I kind of like your for loop - clever way you end it. Goes against my feeling that for loops should be controlled by the value of the counter, but it's more succinct than …

Member Avatar for d1s_0n3_guy
0
213
Member Avatar for matt91turbo

It looks like you are supposed to read the entire text into one array, max size 256. Then, pull each word out, storing to a dynamically allocated array of strings (char ** ). You will have to find the length of each word, or at least the length of the …

Member Avatar for vmanes
0
210
Member Avatar for zothos

[QUOTE=dmanw100;734538]What kind of factorial is this? An input of 3 will result in an output of 6... it should be 3 * 1. If you enter 4 you will get something like 24. Factorials break numbers down like this: 12 factorial = 2 * 2 * 3. To implement a …

Member Avatar for MosaicFuneral
0
294
Member Avatar for The Dude

Let the ridiculousness begin: [url]http://www.forbes.com/feeds/ap/2008/07/30/ap5272246.html[/url] ATLANTA -Georgia business groups are appealing a judge's decision to halt the construction of a power plant, warning that the ruling could stall other energy plants and hamper economic development throughout the state .... Fulton County Superior Court Judge Thelma Wyatt Cummings Moore's ruling relied …

Member Avatar for Dave Sinkula
0
973
Member Avatar for laki234

No one here is likely to "do it for you". If you have a question, we'll be glad to answer. Please read the sticky posts at the top of this forum, and place code tags around your program code, like: [noparse] [code] your code goes here [/code] [/noparse]

Member Avatar for vmanes
0
98
Member Avatar for Lukezzz
Member Avatar for resduq

For your problem, you need to use a file stream variable that's for reading. The ofstream is for writing. Once you've successfully opened the reading file stream, you can pass it to a function like any other parameter - BUT - it must be passed by reference. Your file stream …

Member Avatar for ArkM
0
164
Member Avatar for Foe89

Well, you could start by reading the compiler error messages, they will at least point you to (or near) the places that need fixing. Read your textbook for the examples of how structures/classes should look - what's the difference compared to your problem?

Member Avatar for vmanes
0
498
Member Avatar for kitty7

First, completely read and understand the assignment. The 2D array must be a parameter passed to the various functions. Declaring it in global space is not fulfilling the assignment and is, in general, not a good thing to do in programming classes, or real life programming. The array must be …

Member Avatar for kitty7
0
138
Member Avatar for prushik

Here's an interesting discussion on the topic: [url]http://www.codeproject.com/string/string_conversions.asp[/url]

Member Avatar for Seta00
0
2K
Member Avatar for Briterican

I don't see that the code you posted would display anything. In the reading loop, variable x counts how many records were read. Actually, it will have a count 1 too high based on the way you've set your loop control with the eof( ) method. Then, in the display …

Member Avatar for WaltP
0
113
Member Avatar for ashbrenner

I think you need to state your problem a little more clearly for us. Are you trying to reduce the number of colors in a color image, or are you trying to convert a color image to greyscale? Or something else?

Member Avatar for vmanes
0
157
Member Avatar for FtKShadow

The error is caused by your writing a value past the end of the array's allocation. Line 74 [icode]a[9][9] = c; [/icode] is the culprit. Remember, that for an array sized 10 x 9, the maximum index (the lower right corner) is [9][8]. What is the purpose of this line? …

Member Avatar for vmanes
0
111
Member Avatar for The Dude

So he's chosen as his Chief of Staff someone who was very much in bed with Freddie and Fannie; on his economy team is the governor of a state that's in economic shambles. Yes, this will work out really well. Change. That's all we'll have left in our pockets.

Member Avatar for GrimJack
0
169
Member Avatar for am_mad23

First you take a stab at it, post your code, tell us what's giving you a problem. But then you'd know that if you read the sticky posts at the top of this forum.

Member Avatar for vmanes
0
127
Member Avatar for Ancient Dragon

It's been around several years, and was funny before. Now it's scary!

Member Avatar for Alex Edwards
1
211
Member Avatar for clutchkiller

Since your switch variable cho is a char, your case labels must be like [icode]case '1': [/icode] - the labels must be literal characters.

Member Avatar for clutchkiller
0
138
Member Avatar for DJPlayer

You can use isdigit( ) to validate the input - you just have to do it one character at a time. And know when to stop. Your general algorithm seems sound. The last two steps are really one - as you do the conversion to binary, you will be filling …

Member Avatar for cikara21
0
157
Member Avatar for clutchkiller

Without the [icode]using namespace std;[/icode] you will have to preface most everything from the libraries with std:: (and who wants lots of std's in this day and age?;) Without it, you might have to open a file like [code] std::fstream fin ("text.txt", std::ios::in ); [/code] The using statement makes everything …

Member Avatar for clutchkiller
0
82
Member Avatar for ecullenlvr

For your first problem, read a number from the file. Use that number as the limit on a loop that reads in values to be summed and averaged. Main loop comes around again, reading in the next count of values number, .... I'd put the reading statement for the count …

Member Avatar for vmanes
0
139
Member Avatar for localp

In Visual C++ 2008 I don't get any errors, it works fine, using either way you've posted. Is there more to this than you're telling us? What is the exact error message you get? I would note, you are looking for problems in naming the struct type and the array …

Member Avatar for vmanes
0
167
Member Avatar for clutchkiller

The return statement, with a value, simply returns that value to the caller from the current function. In the case of your main( ) function, this is "called" by the operating system, and main( ) returns a value to the OS upon completion. By convention, return value 0 indicates the …

Member Avatar for vmanes
0
273
Member Avatar for piznut25

First, you state the problem in terms of 10 numbers for input, but your array and loops are sized for 11. If you just type in 10 numbers, the for loop is waiting for the 11th! Also, you pass an array to the get_integers( ) function, but inside it declare …

Member Avatar for vmanes
0
95
Member Avatar for GrimJack
Member Avatar for lllllIllIlllI

[QUOTE=Ancient Dragon;731593][b]Location:[/b] My Town near St Louis Illinois [b]price in gallons:[/b] $2.05 (USD) $3.05 (AUS dollars) The price of gas is now 1/2 what it was a year ago.[/QUOTE] It's about 2/3 of a year ago, 1/2 of four months ago. Here's the [URL="http://www.eia.doe.gov/oil_gas/petroleum/data_publications/wrgp/mogas_home_page.html"]history chart[/URL]. Rapid City SD $1.97 per …

Member Avatar for vmanes
0
194
Member Avatar for Ancient Dragon

John McCain came to the Sturgis Bike Rally. I don't think Obama could find Sturgis. Even with Google Maps.

Member Avatar for GrimJack
0
533
Member Avatar for clutchkiller

You do have function prototypes, and the prototype for move( ) agrees with your implementation? Seeing your full program would help.

Member Avatar for clutchkiller
0
136
Member Avatar for drdolittle

[QUOTE=Lerner;730332]My first thought is because int** is not the same as int[][], though the syntactic use of each is quite similar.[/QUOTE] You're quite right. The int** is a pointer that would be allocated an array of pointers, each of which point to an array of ints. int[][] is a contiguous …

Member Avatar for grumpier
0
121
Member Avatar for extrov

[QUOTE=TheBeast32;721078]Hello is spelled without the w. =) Also, trigonometry is the way to go. You can probably find a tutorial or something: [url]www.google.com/search?q=Trigonometry+Tutorial[/url][/QUOTE] My fingers get out of sync with my brain so often, every time I try to demo "Hello world" it comes out "Hellow orld" Or maybe it's …

Member Avatar for extrov
0
172
Member Avatar for The Dude
Member Avatar for vmanes
0
23
Member Avatar for tupacpalaman
Member Avatar for William Hemsworth
0
201
Member Avatar for jgelderloos

How are you reading in the input string? If you use [icode]cin >> str;[/icode] all you're going to get is one word of input. Use [icode]getline( cin, str );[/icode] to read in multiple word strings. Also, your loop control [icode]while(charPosition != (length + 1)) [/icode] is an OBO situation.

Member Avatar for cikara21
0
198
Member Avatar for vmanes

Listening to a "radio" broadcast on iTunes, one of the Live365 stations, and they've played an ad several times for "CIA Clandestine Services." I've seen print ads for them in magazines (military related), but find it a bit odd that they're advertising in this venue. [URL="https://www.cia.gov/careers/jobs/clandestine-service/view-jobs/index.html"]Here's where you can find …

Member Avatar for sneekula
0
185
Member Avatar for The Dude
Member Avatar for cooljeff1379

Visual C++ is C++, with the Visual Studio IDE. You should not encounter any significant differences between code written for other current implementations of C++. By Classic C++, I'm assuming you mean any of the other compilers such as gcc, MinGW, current Borland products, and not some old, out of …

Member Avatar for kux
0
386
Member Avatar for robgeek

First, I'd like clarification on the assignment and the techniques you're supposed to be using. - Are you in fact supposed to use dynamically allocated array (using int * )? - If so, do you have to actually change the size of memory allocation, or just keep track of the …

Member Avatar for robgeek
0
238
Member Avatar for jems000

You're using a Borland compiler, which provides a library for graphics, which is not found on the destination computer. Check your compiler options for linking in the graphics features.

Member Avatar for jems000
0
156

The End.