2,045 Posted Topics

Member Avatar for emi teliyadu

Also make sure the compiler is in the path of whatever cmd console you are using. Under windows (I assume, since you have C++.exe) type "PATH = %PATH%;C:\MinGW\bin" (change the values for your system) which tacks that directory on to the existing path

Member Avatar for jonsca
0
104
Member Avatar for j4jawaid

Would something like this work (if you used Visible = false in your resize method instead of Hide())? [code] private void notifyIcon1_MouseDoubleClick(object sender, MouseEventArgs e) { if(this.WindowState == FormWindowState.Minimized) this.WindowState = FormWindowState.Normal; this.Visible = true; } [/code]

Member Avatar for jonsca
0
146
Member Avatar for mimis

I think since the other array must track the indicies of the first it would be difficult to use the STL methods anyway. What are some of the things you have tried?

Member Avatar for mimis
0
113
Member Avatar for froggy1976

Also, your method definitions, e.g., [code] void dayOfTheWeek::printDay() { cout << "Today is: " << day[dayNum] << endl << endl; }[COLOR="Red"];[/COLOR] [/code] and onward should not end with a semicolon after the brace (you do still need the ones at the end of your class declaration and your const array).

Member Avatar for mitrmkar
0
129
Member Avatar for coolfriend

*Please* use code tags. It keeps it neater and preserves your formatting so we can read the code. Make balance and bet doubles also, as what if I lost 20.50 in the process or wanted to bet $4.50? cout<<"Please enter your bet$100.00):"<<endl; //hint this line should be updated for each …

Member Avatar for jonsca
0
124
Member Avatar for Hidden-Coder

Sounds like you need regular expressions. Here's a succinct tutorial I came across. They are toting some product or something but it has a few good examples of what you might need towards the bottom of the page. [url]http://www.radsoftware.com.au/articles/regexlearnsyntax.aspx[/url] Here's the MSDN page that gives a couple of oversimplified examples …

Member Avatar for Hidden-Coder
0
159
Member Avatar for qupav

I may be missing something but why do you have [icode] (const E &item) [/icode] _after_ the braces?

Member Avatar for qupav
0
131
Member Avatar for Manxie

Replace your [icode] cin.ignore(cin.rdbuf()->in_avail() + 1); [/icode] call with [icode] cin.ignore(); cin.get(); [/icode] the get() will wait for a keypress from the user.

Member Avatar for jonsca
0
94
Member Avatar for rwill357

I've tested it and it seems to come out ok (against a site like [url]http://www.ohrt.com/odds/binomial.php[/url]). What trouble are you having with it?

Member Avatar for rwill357
0
191
Member Avatar for Alicito

Using 2 datetime pickers you can get the timespan between them [code]TimeSpan ts = dateTimePicker2.Value - dateTimePicker1.Value; MessageBox.Show(ts.ToString()); [/code] To do what you're suggesting would probably take the user putting in one of them to the DTP, hitting a button to lock the value into one DateTime object, choosing a …

Member Avatar for jonsca
0
133
Member Avatar for chromatinpt

[CODE]newtextbox.Text = oldtextbox.Text.Substring(12);[/CODE] The 12 accounts for the commas in the string. Substring(12) grabs all characters (including) 12 and beyond.

Member Avatar for jonsca
0
132
Member Avatar for sisse56

[QUOTE=jonsca;1099095]When going through your loop after entering in the physician's name [code] for( i=0;i<n;i++) { cout<<"\nEnter physician "<<i+1 <<" name :"; cin>>phy_name[i]; [/code] it's trying to write the entire name to phyname[i] which [I]is[/I] only one character. Consequently the extra characters remain in the stream, writing into the next set …

Member Avatar for WaltP
-2
127
Member Avatar for coolfriend

Please use the code tags if (guess < randomNumber) // If guess is < than the random number, display cout << "Your guess was too low\n\n"; if (guess > randomNumber) // If guess is > than the random number, display cout << "Your guess was too high\n\n"; You did not …

Member Avatar for WaltP
-7
283
Member Avatar for xka

Don't use goto. Use a loop instead. This way you can put in an exit option. When getting input like you are use a do/while loop so that you can test for whether you should exit the loop after you've gone through one cycle. Your function names leave a bit …

Member Avatar for jonsca
0
186
Member Avatar for sapphyr

A few hints: 1.) [icode] int square(int side, int i); [/icode] is a function prototype. It should not be placed in main() 2.) function parameters are used to convey information between different methods. what information is i bringing into the square() method? 3.) grab a pencil and paper and go …

Member Avatar for sapphyr
0
159
Member Avatar for Web_Sailor

So just to clarify in your example the output should look like: [CODE]<space><space>y12-100<space> z1234-250<space><space> x1adsf-5 <space><space>y12-150<space> z1234-300 <space><space>y12-200[/CODE] this? (with width = 8) I'm just a tad confused...

Member Avatar for jonsca
0
233
Member Avatar for sisse56

When going through your loop after entering in the physician's name [code] for( i=0;i<n;i++) { cout<<"\nEnter physician "<<i+1 <<" name :"; cin>>phy_name[i]; [/code] it's trying to write the entire name to phyname[i] which [I]is[/I] only one character. Consequently the extra characters remain in the stream, writing into the next set …

Member Avatar for jonsca
0
107
Member Avatar for nathan_jun2

Firstly, please learn to use code tags ` EmpRec>>Ename>>emp_rec>>no;` This is reading exactly one line from your text file and stopping. The expression you have in your while loop condition isn't actually doing anytihng. Put `mpRec>>Ename` as your while loop condition while(EmpRec >>Ename) { EmpRec >> emp_rec>>no; //you might be …

Member Avatar for nathan_jun2
0
121
Member Avatar for makan007

You get a compiler error because the return type of your function is void (therefore no object to pass to cout) Since you are passing grade by pointer into the findGrade method, you should call the function first by itself, after that grade will have changed and you can output …

Member Avatar for jonsca
0
192
Member Avatar for roachae

Are your indicies of a type that have the ability to be directly compared? (like ints or strings)? If not you must write an IComparer<your_index_object> method and pass it into the constructor of the sorted list. Here's the MSDN for sorted list. [url]http://msdn.microsoft.com/en-us/library/system.collections.sortedlist.aspx[/url]

Member Avatar for jonsca
0
236
Member Avatar for sodak

I couldn't figure it out either initially but he means when you open that same Properties window but for example with a Word document. You get all those fields in that context.

Member Avatar for jonsca
0
111
Member Avatar for usstang

Check [URL="http://msdn.microsoft.com/en-us/library/aa394122(VS.85).aspx"]this[/URL] out(using Windows Management Instrumentation, WMI). I think it's what you are looking for but it's a Win32 API call so it involves using the P/Invoke technique (in which I am not versed). EDIT: Using that relies on [URL="http://msdn.microsoft.com/en-us/library/aa393485(VS.85).aspx"]this[/URL] which isn't implemented (??) in the WMI. Wish I could …

Member Avatar for jonsca
0
119
Member Avatar for bonnysammy

Select all the items on your form (or select them in groups if you don't want the same settings for all of them). Go over and click on the properties tab under Solution Explorer (if you can't see it, go to View/Properties Window). Go to the margin setting. Change as …

Member Avatar for jonsca
0
87
Member Avatar for makdu

These two might be overkill for what you are seeking (but they are in C#): [url]http://www.menees.com/index.html[/url] [url]http://www.codeproject.com/KB/recipes/diffengine.aspx[/url] Do a net search on "Diff" which is the utility in *nix to do this kind of thing. I think (it's been eons since I've used it in any form) that it makes …

Member Avatar for makdu
0
122
Member Avatar for phpangel

[icode]if (matrix[x][y]!='you have choosen the worng letter')[/icode] What is that? ' ' surround single characters, not strings. How could your matrix value ever be equal to that? Why don't you check if it's equal to 'x'? Also: [code] if (matrix[i][0]==matrix[i][1]&&matrix[i][0]) is not doing what you think for all those if …

Member Avatar for WaltP
0
1K
Member Avatar for deepin

Just put in a test between the end of your switch and the end of the while loop. } //end of switch case if (i == 0) break; // you need another break to get out of the while } //end of while (if you can still edit your post, …

Member Avatar for WaltP
0
3K
Member Avatar for Shillz

[quote]i meant c++ graphics..[/quote] No such thing, at least not in standard C++. What you have is a non-standard library which was created by Borland (and others). If you are still trying to use a ca. 1993 Turbo 3.X technology on a ca. 2006 operating system then you may be …

Member Avatar for CppBuilder2006
0
983
Member Avatar for zukkoor

You still have that block from 22-38 that's segregated without any reason for doing so. You're returning 0 from a function that has void type (so it shouldn't return anything) and you have a dreaded goto in your code which should only [I]possibly[/I] be used under the most dire of …

Member Avatar for jonsca
0
3K
Member Avatar for nerdinator

I don't think anyone is shunning you, I think it's just a [I]highly[/I] specialized topic. I'm not in the music arena at all but I'm sure there are APIs out there, though they may be specific to whatever sound card you have and the like. It couldn't hurt to elaborate …

Member Avatar for Ancient Dragon
0
94
Member Avatar for xclusv-aj

Welcome. What have you tried so far? [quote]before the main() or inside the main()?? [/quote] Normally variables are declared within main and passed into methods. Variables local to a particular function are declared within the body of that function. [code] #include<iostream> void myfunc(int passedin) { int madeinfunc = 0; madeinfunc …

Member Avatar for Nick Evan
-1
84
Member Avatar for shabeg

Check out this great article: [url]http://ondotnet.com/pub/a/dotnet/2002/02/11/csharp_traps.html[/url] in the article: "...because finalization is nondeterministic (meaning you can’t control when the garbage collector will run)..." Dispose() can be used for any and all cleanup required but the garbage collector will gather the object and call it's destructor (thus finalizing the job). I …

Member Avatar for jonsca
0
250
Member Avatar for ayeshawzd

See also [URL="http://en.wikipedia.org/wiki/Taylor_series"]http://en.wikipedia.org/wiki/Taylor_series[/URL]

Member Avatar for ayeshawzd
0
484
Member Avatar for reyarita

See this for all the details members that are modifable in a console application (colors, positioning cursor etc) [url]http://msdn.microsoft.com/en-us/library/system.console_members(VS.80).aspx[/url] See this for a port to C# of a popular console manipulation library in C and C++ [url]http://sourceforge.net/projects/curses-sharp/[/url] It's not going to be as straightforward as designing a GUI for Windows. …

Member Avatar for avirag
0
180
Member Avatar for makdu

First, make sure the files are in the same namespace. Look at the top few lines of each after the using statements to see. If that's not the problem type out the steps you followed to add the file in. EDIT: What mahmoud says may be the way to go …

Member Avatar for mahmoud_wow
0
239
Member Avatar for a7med sh

[code=c++] void searchingSimiler ( char letters[], int counts[], [B]int updatenew[],[/B] char newletter ) [/code] What is updatenew anyway? I recommend replacing it with a variable called letterarrcount (or whatever) which you pass in by reference. [icode]j < letters[j] [/icode] -- this is completely wrong -- I would use letterarrcount in …

Member Avatar for jonsca
0
146
Member Avatar for jigglywiggly

It's never a bad idea to know what your code is doing. However, you don't necessarily have to run it yourself to see (which you could do by making a main() method in a new .cpp file and #include "word.h"). Take a look at the overridden >> operator. Normally the …

Member Avatar for Agni
0
160
Member Avatar for froggy1976

Delete your variables mon and tues and simply have a [icode] string dayofweek; [/icode] member Then your (non-default) constructor only has to take 1 argument a string holding the day, so e.g., dayOfTheWeek(string dotw) and within the constructor set dayofweek = dotw; Another hint, getters should "get" the value of …

Member Avatar for C++Rookie
0
191
Member Avatar for cyberguy007

It'll be very similar to your viewAll() method. Just test for Prod_stockcount before displaying.

Member Avatar for jonsca
0
116
Member Avatar for NoviceChrilill

[icode] The ch3 is Æ [/icode] is what printed on my system. I don't think I have any settings on for international characters so I'm not sure why it worked. In your IDE does '\u00c6' appear brownish with the syntax highlighting?

Member Avatar for NoviceChrilill
2
259
Member Avatar for vinnijain

[quote]I enter marks through textbox, which gets saved in database. [/quote] If you've stored them in the database what is stopping you from retrieving them again. Is it a database of your own design?

Member Avatar for avirag
0
137
Member Avatar for Szabi Zsoldos

For n < 4 you are getting(as you go through the loop): [code] result +=billy[0]; //billy[0] = 16, result = 16 result +=billy[1]; //billy[1] = 2, result = 18 result +=billy[2]; //result = 95 result +=billy[3]; //result = 135 [/code] What you are doing with the loop is accruing a …

Member Avatar for WaltP
0
72
Member Avatar for imso

hint: on this line [icode]printf("\n\tThe binary number %s has been converted to %d decimal\n\n",i ,result); [/icode] the variable i is not a null terminated string. Also, try fgets(reference [URL="http://www.cplusplus.com/reference/clibrary/cstdio/fgets/"]here[/URL] - ignore that it's a C++ site)for your input it's much cleaner (and standard).

Member Avatar for Dave Sinkula
0
214
Member Avatar for ireimaima

It resets the indicator for whether or not the number is prime for the next cycle through the loop. Otherwise it stays false and will keep breaking out of the inner for loop instead of testing. The total number is simple just put a counter inside the [icode] if (isPrime) …

Member Avatar for ireimaima
0
123
Member Avatar for hitro456

You can use the Split() method of the string to divide it up by a set of delimiters into a string array. Then you can use the static TryParse method in any of the numeric types (e.g., Int32.TryParse(), float.TryParse(),and for double, Int16,Int64, even boolean) to get numbers from the individual …

Member Avatar for hitro456
0
538
Member Avatar for sam1

What are you using to indicate that the datum needs validation (e.g., button, pressing enter, etc.)? I allowed enter in the textbox, checked for the key down and it worked with the convert method. EDIT: That was a tie lol

Member Avatar for MrSpigot
0
2K
Member Avatar for foxmulder

Missing some semicolons after lines 24 and 50. You left off the e in infile on 44 and 70. Not sure why you didn't strcpy on 26 and 27. Most vital is intializing i to 0 on line 39 (since your first trip through the loop it doesn't have any …

Member Avatar for foxmulder
0
187
Member Avatar for caroll
Re: tilt

Well, the real story is you never write ~~~m back to m to print it out so you're getting your old value. As for ~ it inverts the bits of an integer (bitwise not), so assuming a 32 bit integer: m = 00000000 00000000 00000000 00000001 ~m = 11111111 11111111 …

Member Avatar for caroll
0
142
Member Avatar for metalclunch

Why not use [code] enum pInfo { pLevel, // =0 pMember, // =1 pLeader // =2 }; int PlayerInfo[MAX_PLAYERS][3]; [/code] otherwise you have all the elements in the enum = 0 so PlayerInfo[n][pLeader] would be the same as PlayerInfo[n][pLevel] (all accessing the [n][0] cell). The latter change is going along …

Member Avatar for metalclunch
0
1K
Member Avatar for defeater_man

Main() returns an int. Give [URL="http://www.eskimo.com/~scs/readings/voidmain.960823.html"]this[/URL] a read. You cannot use the bitshift operator with a string, the compiler states that very clearly. You could probably write your own shift function that will push a 0 onto the beginning or the end of your string. Otherwise for the built-in ones …

Member Avatar for jonsca
1
152
Member Avatar for gerard4143

(I'm not sure if this is correct, but avert your eyes if you're still working on it) ********************************************************** I think the statement in main is interpreted as a redeclaration of the function.

Member Avatar for jonsca
1
114

The End.