2,045 Posted Topics

Member Avatar for monty2831

Which component is giving you the most trouble? The instructions seem to be a good starting point. Try to implement at least some portion of it (class, two constructors, etc.) and post your code and someone will help.

Member Avatar for jonsca
0
111
Member Avatar for "roja"

Please be more specific about the nature of your difficulty. Please post your code.

Member Avatar for sdeez_alpha
0
121
Member Avatar for slacke

Dev is outdated, comes with an older version of gcc, and is no longer in development. Try Code::Blocks it definitely has that feature you are looking for. Eclipse has it too, I believe.

Member Avatar for jonsca
0
393
Member Avatar for MasterGberry

I can't directly answer your question, but there are programs available that do similar things like wix ([url]http://wix.sourceforge.net[/url]). I've never used it (as usual), but it seems very extensible.

Member Avatar for MasterGberry
0
132
Member Avatar for bookmark

For starters, I would try rewriting it in a more conventional way, you'll probably understand it better. Think about the open square as a line at the top row and bottom row, and one square in the first and one in the last column for all other rows. This way …

Member Avatar for VernonDozier
0
129
Member Avatar for aznlitomik3

The order you process the numbers in is important, you have to be taking out multiples of the smaller number from the larger one. A few if statements should correct the problem.

Member Avatar for jonsca
0
150
Member Avatar for blahhaha

There must be a critical file missing from your install. Can you try reinstalling it? Really you're probably much better off getting MingW (the windows port of gcc) with Code::Blocks) or one of the Visual C++ Express Editions.

Member Avatar for jonsca
0
42
Member Avatar for atoivan

[quote]But the thing is if i can do it in java i can do it in C and C++ [/quote] Have a go at it and we'll help you. Some folks speak Java, but it's been a while for others. Rather than take up the time of someone in the …

Member Avatar for jonsca
0
222
Member Avatar for wst

"nod" is declared in your constructor which means it is a local variable, and is destroyed once the constructor completes. Declare "nod" as a private member variable, and then you can initialize it in the constructor as you have.

Member Avatar for jonsca
0
163
Member Avatar for Billybe
Member Avatar for n0de

For line 140, you want [icode] is_open() [/icode] for sure. EDIT: Also, the g in seekg is for "get pointer," which belongs with ifstream only. The corresponding functions end in p for the ofstream. (see [url]http://www.cplusplus.com/reference/iostream/ofstream/[/url] midpage).

Member Avatar for n0de
0
375
Member Avatar for skorm909

Try Googling those terms. It's been a while since you've posted, but I remember you were going through similar things before. Find the simplest example that does what you want and emulate it in a short test program (3-5 lines) and then integrate it into your work.

Member Avatar for jonsca
0
146
Member Avatar for DynamicMember

Can you make a loop that will count 1, 3, 5, etc.? Use that. I'm not sure what the e means either. Do you have an actual value for s? Perhaps you are supposed to stop adding terms when you are within 0.1 of the value of s.

Member Avatar for jonsca
-1
111
Member Avatar for jmcorpse

I'm not sure I understand what you are trying to accomplish. You're reading in the names as std::strings into Name, but then you don't do anything else with it. You've got a colon after Name on line 29, so that's probably why it's getting stuck (colons can indicate a label …

Member Avatar for jonsca
0
90
Member Avatar for hdb25

int[B]t[/B]obin is spelled incorrectly on line 25. Remove line 72, the redeclaration of n is masking your function parameter n.

Member Avatar for hdb25
0
173
Member Avatar for nepkancha

Plan out what you need to do on paper first. As a start, you should be taking care of part 2 all at the same time instead of in a separate loop. March along your num array, when you come upon a number, see if it's in dist, if not …

Member Avatar for WaltP
0
118
Member Avatar for rain.divine88

See if something like this [url]http://www.cplusplus.com/reference/clibrary/cstdlib/strtol/[/url] will help you at all. You can use the fact that it doesn't convert if there is no valid number there to your advantage (and just account for the negative values [I]post hoc[/I])

Member Avatar for Shankye
0
160
Member Avatar for Raja Paul

Here's an example of one in C++/CLI (so if you were to create a WinForms application in VC++) [url]http://www.speakcomputers.com/Windows-Forms-Programming/C-PlusPlus/TreeView.aspx[/url] Otherwise, you need to come to us with something, as there are a bunch of tutorials out there. Make some decisions about your implementation at least (e.g. Win32 API vs. .NET …

Member Avatar for jonsca
0
104
Member Avatar for djhog

Both find() and size() return an item of datatype "size_t," which means what it actually returns is defined from system to system, but normally is an unsigned int. Make i and pos of type size_t. For next time, please list what the warning is so someone doesn't have to guess.

Member Avatar for jonsca
0
170
Member Avatar for jmcorpse

Within main, call getSize() and after that use the 2 values to establish the dynamic arrays in main(). Pass the arrays and the sizes into createArrays, and initialize them to zero there. Then pass the arrays and sizes into fillArrays.

Member Avatar for jonsca
0
212
Member Avatar for jaygarsh

Your problem is in line 34. Say there are 10 students, so on the line before you set aside an array of 10 (which has indexes from 0 to 9). So next you are trying to create an array at student[10].test, which doesn't exist. You must have a loop going …

Member Avatar for jaygarsh
0
127
Member Avatar for dinners

It's on line 9. [B]0.5[/B] is considered a double. Change line 9 to [icode]area = static_cast<float>(0.5*sum); [/icode] to tell the compiler that's what you mean to do (or use a C style cast like [icode]area = (float)(0.5*sum);[/icode])

Member Avatar for dinners
0
303
Member Avatar for Alexkid

The first is a preprocessor directive, before the compiler compiles your code, it will go through and replace sum with 1. The second declares a variable in memory to hold that quantity. I'm sure it can be argued as to which is best, but the "const int" is probably more …

Member Avatar for Alexkid
1
120
Member Avatar for tech9x

num1 only exists within the scope of main, you must pass it into your function to use it. I have been reading your posts and I think that you are missing some fundamental ideas. If you have a textbook, go back and reread the appropriate sections, as your misperceptions are …

Member Avatar for jonsca
0
103
Member Avatar for chode1
Member Avatar for jonsca
0
145
Member Avatar for Martje

Modify the constructor of form2 to take a form1 object. Assign that to a private form object in your form2. Operate on it like you would any other object.

Member Avatar for jonsca
0
85
Member Avatar for andimiami

[code] [100 | 95 | 85 | 50 | 91] //read into this int array (show here illustratively) //use a function to translate (your if/else construct goes here) ['A' | 'A' | 'B' | 'F' | 'A'] //your new array [/code] A char array is just an array of characters, …

Member Avatar for andimiami
0
151
Member Avatar for tech9x

Use a loop check to see if a given value in the array matches the data you are looking for (or meets a certain criterion). Then set that value to zero or something appropriate to that particular array (so if it's a string array, set it to space or something.

Member Avatar for tech9x
0
231
Member Avatar for Lasbunter

[QUOTE=Lasbunter]Please share here what you know about that ,, :)[/QUOTE] Please feel free to do the same! Please post the code you are having trouble with or at least a rough pseudocode outline of what you think should be included to start.

Member Avatar for Perry31
-4
143
Member Avatar for Spartan_MSU12

Pass in numusers to ReadAllUsers by reference. Change lines 14 and 33 and add an & between int and numusers. The way you have it now, numusers is uninitialized in main, so you send garbage into ReadAllUsers, which only changes [I]a copy of it[/I] to a value, but the one …

Member Avatar for jonsca
0
181
Member Avatar for kshaaban

Never done it but there's plenty of documentation out there: [url]http://stackoverflow.com/questions/145270/calling-c-c-from-python[/url] seems to be loaded with information. Try searching the Python forum here too, but don't double post your thread, ask for it to be moved (click 'Flag Bad Post') if you think your question is better suited over on …

Member Avatar for kshaaban
0
314
Member Avatar for tech9x

It shouldn't have compiled, you declare sizeOfArray after you try to use it. Take that value in before you instantiate a string array. See what I wrote in your other post too, you have a bunch of uninitialized pointers declared at the top of your code which are going to …

Member Avatar for mike_2000_17
0
137
Member Avatar for hq1

I compiled it and did not get that warning, as it seems you have initialized it properly. There are a host of other errors. Does line 77 look right to you? There are 6 more errors like that. Someone had pointed that out in an earlier post. Also, for example, …

Member Avatar for hq1
0
284
Member Avatar for svatstika

See your other post. It indicates a pure virtual function, which automatically designates your class as abstract.

Member Avatar for svatstika
0
127
Member Avatar for tech9x

Review in your text the distinction between char * and string * -- I think you are very confused. Also, you are reading into a bunch of uninitialized pointers. Yikes.

Member Avatar for jonsca
0
152
Member Avatar for svatstika

[icode] virtual void clear()=0; [/icode] makes your class abstract (as it is a pure virtual function). You must inherit from your class to use it. BTW, you don't have to specify "public" as an access specifier in a struct, line 9, as structs have a default public access to all …

Member Avatar for jonsca
0
158
Member Avatar for tech9x

[QUOTE=geojia]Edit: NVM your problem isn't the c_str(), userInput is already char. [CODE] strcpy (cstr, userInput); [/CODE][/QUOTE] userInput is a [icode] string * [/icode] which means you have to dereference it using the -> operator, so [icode] userInput->c_str() [/icode] @OP You still will need to include [icode] <string> [/icode] if you …

Member Avatar for jonsca
0
383
Member Avatar for thisischris

Just an aside, you shouldn't use .fail(), use .is_open() .fail() is for checking when a stream reads something it wasn't supposed to (like trying to read a string into an integer). There's one way to find out exactly where your program is failing, run it in a debugger and single …

Member Avatar for thisischris
0
100
Member Avatar for MasterGberry

In the second listing, get rid of line 7 and wrap the code from 10 to 81 in [code] namespace SALES { } [/code] You need to specify that all of that is in the same namespace as your header file declarations. There's a bug with one of the array …

Member Avatar for MasterGberry
0
155
Member Avatar for alaa sam

Something like [url]http://www.mpir.org/[/url] (or [url]http://gmplib.org/[/url] if you're on *nix). Check the documentation for the largest number allowed, as 500! may far exceed it. Remember that 500! is a monstrous number! Check to make sure your assignment isn't to approximate it somehow.

Member Avatar for alaa sam
0
87
Member Avatar for geryin

2 things to note: There's a relationship between the number being read in and the desired index of the string vector. When you are erasing on line 43, you are changing the vector's size, which affects your counter. I'm sure you've had iterators in class too...

Member Avatar for jonsca
0
160
Member Avatar for StreetBallerX

[quote]and the worst is that they gave us this task before explaining the functions[/quote] I'm sure there are on the order of 10^23 pages online about functions and you probably have a textbook. This is my interpretation: [code] string dec2bin(int decimal); //prototype int main() { //input a number "num" here …

Member Avatar for jonsca
0
103
Member Avatar for jonsca

Happy Thanksgiving! This is a minor annoyance, but it's happened to me 3 times in 2 days so I figured I'd letcha know. I'm using Chrome 7.0.517.44 and when I've gotten a PM, the screen goes "dark" (as usual) but no dialog pops up and the browser gets stuck (I …

Member Avatar for jonsca
0
168
Member Avatar for geryin

Hint: what would be a good name for a method that returns the size of an item? (there are two options for string actually). Put Google to work for you.

Member Avatar for jonsca
0
69
Member Avatar for adarbyem
Member Avatar for ahmad deeb
Member Avatar for jonsca
0
41
Member Avatar for salamjamal10

Talk yourself through what steps you have to go through to work the queue (enqueuing and dequeuing). Think about the elements of the array. What steps have to happen after you remove the first element if the queue is built on an array model? Reread your text's section on big …

Member Avatar for VernonDozier
0
205
Member Avatar for rozario2010

No one is going to give you the source code, that's unreasonable to ask as it is [B]your[/B] project. Break this down into smaller tasks and plan out what you need to do for each one.

Member Avatar for jonsca
-1
550
Member Avatar for dhawalruud

You need to be specific about what the issues are. As the great (moderator) WaltP will tell you, "we're not mind readers."

Member Avatar for jonsca
0
691
Member Avatar for Hayzam_#include

You probably don't need system if it's a GUI application, as clicking the button to display hello world shouldn't close the window unless you explicitly tell it to.

Member Avatar for Hayzam_#include
0
100

The End.