2,045 Posted Topics

Member Avatar for BobFX

Do you have freedom in your class design that you could instantiate it within the Form1.h code and pass your form1 in as a parameter to the constructor? (or better yet whatever individual UI components you needed instead of the whole thing)

Member Avatar for BobFX
0
124
Member Avatar for shianggu

This is really a C program, which should be in the C forum. You wanted to stay on "AT&T Boulevard" but take a left on Ritchie Street instead of taking a right on to Stroustrup Lane. Try dropping a `getchar();` statement at the end of the program before your return …

Member Avatar for jonsca
-2
92
Member Avatar for pink24_ann07

Welcome. Please read the following [url]http://www.daniweb.com/forums/announcement8-2.html[/url] After you've looked it over and brought some code to the table, we'd be happy to help you with it.

Member Avatar for jonsca
-4
122
Member Avatar for monkey_king

It's defined on line 166 of [url]http://fxr.googlebit.com/source/lib/libz/zconf.h[/url] (same library different site) which is included in zlib.h which your file includes. It checks for this STDC value which I assume means whether the system supports standard C. It seems to expand to a prototype of the functions. I know precious little …

Member Avatar for jonsca
0
137
Member Avatar for LemonLemon

Select Win32 console project if you did not already. If you haven't create a new project for Win32 Console. Leave empty project unchecked and uncheck precompiled headers. See if any or all of that helps :) (Also make sure it built correctly with no errors, though it sounds like you …

Member Avatar for restrictment
0
148
Member Avatar for Carrots

Topi is on the right track I think. A portion of it has to do with your preprocessor directives. I've never seen one with a period in it and this is why I suppose. Most people use an underscore in place of the period (the convention is to name it …

Member Avatar for jonsca
0
356
Member Avatar for timtianchen

I agree with firstPerson. However, I'm confused as to why this function marches along initializing some of the array members and then stops. You are asking it to "get" an element but returning a whole array. Unless you are doing some error checking that isn't evident in your code why …

Member Avatar for monkey_king
0
148
Member Avatar for cthoes

Firstly, use fgets to obtain your name string from the user. See [URL="http://http://www.cplusplus.com/reference/clibrary/cstdio/fgets/"]this[/URL] for a reference (it's a C++ site but it should be nearly the same). Next look into [URL="http://www.cplusplus.com/reference/clibrary/cctype/"]ctype.h[/URL] and there's a function tolower() that will help you if you don't know whether the text is in caps …

Member Avatar for cthoes
0
164
Member Avatar for BobFX

[code] using namespace System::Collections::Generic; //at the top of Form1.h //here are the details of my little stub just to give you a ready test //program (I don't know what your specific requirements for the // LVI are so I just cobbled it into a button event. ListViewItem ^ lvi = …

Member Avatar for BobFX
0
1K
Member Avatar for kde

Write out what the loop would be printing for a 2x3 case [code] mat[0][0], mat[0][1], mat[0][2], mat[1][0], mat[1][1], mat[1][2] Your 2x3 counter would be 0 1 2 3 4 5 [/code] So how do you get 0 to be [0][0], 1 to be [0][1], etc, 5 to be [1][2] All …

Member Avatar for jonsca
0
102
Member Avatar for sknake
Member Avatar for sknake
2
430
Member Avatar for roswell67

Well more than likely your program is going to be doing some event driven stuff (reacting from a button getting clicked, text changed in a textbox). Just to test out the concept put a button from the Toolbox onto your form (or whatever your gui need is),go over to Solution …

Member Avatar for roswell67
1
139
Member Avatar for MAV_DevWantaB

I'm assuming you are using VC++ ? Go up to Project/"Your Proj Here Properties"/Configuration Properties/Debug/Command Arguments and put something for it to print out (separated by spaces). If you're not using VC++ then just put some arguments after your exe name when you are running it. "myexe -parameter1 -parameter2" (you …

Member Avatar for WaltP
0
135
Member Avatar for vinodxx

See [url]http://www.embedded.com/story/OEG20020429S0037[/url] (it happens to be an embedded article but it still applies). When you are passing parameters to a function they are not guaranteed to be evaluated from left to right, right to left or any other order. I tried it on 2 different compilers (VC++ 2008 Express and …

Member Avatar for vinodxx
0
126
Member Avatar for 28daniela28

The first backslash is an escape character, just like when you type \n you are escaping the character n and qualifying that it's a newline. So say you had for example mydir[B]\n[/B]ame in your directory string (or any string for that matter) you then have to escape the \ character …

Member Avatar for 28daniela28
0
114
Member Avatar for spiderphp

In case you need some references: [url]http://en.wikipedia.org/wiki/Gaussian_elimination#Pseudocode[/url] [url]http://en.wikipedia.org/wiki/Pivot_element#Scaled_pivoting[/url] What code do you have so far?

Member Avatar for jonsca
-2
103
Member Avatar for sivaprakas

If you're looking for OCR [url]http://www.simpleocr.com/[/url] Otherwise [url]http://www.google.com/#hl=en&source=hp&q=C%2B%2B+Twain&aq=f&aqi=&oq=&fp=b36c7832dbb01be6[/url] I have not used any of these SDKs so I cannot speak for their quality or content.

Member Avatar for Rajesh R Subram
0
97
Member Avatar for forneamax

Try something like this. The true passed to ReadKey() suppresses the output of the character to the screen. [code] ConsoleKeyInfo a; do { a= Console.ReadKey(true); switch(a.Key) { case ConsoleKey.O : Console.WriteLine("You ordered an orange"); break; case ConsoleKey.A: Console.WriteLine("You ordered an apple"); break; //etc. } } while(a.Key != ConsoleKey.E); [/code] Since …

Member Avatar for forneamax
0
132
Member Avatar for inmar

Try popping in a %20 for the space "C:\\Program%20Files\\Microsoft\\Exchange%20Server\\Bin\\eseutil.exe\" Having the path in quotation marks should take care of that but it seems like in your other example it's truncating based on the space.

Member Avatar for donaldw
0
413
Member Avatar for thewonderdude

Take a look at this thread:[url]http://www.daniweb.com/forums/post246417.html#post246417[/url] Substitute ':' for ',' in the delimiter of the second getline call and you should have what you need (minus fixing it to work with your arrays,etc). You can use an N x 3 array for holding the strings or just do your parsing …

Member Avatar for jonsca
0
139
Member Avatar for laelzio.mosca

Is this [code] Player one can enter your coordinates for X 2 1 | | X | X | O ____|____|____ | | X | X | ____|____|____ | | | O | O | | N spots 0 DRAW [/code] the condition you are talking about?

Member Avatar for jonsca
0
109
Member Avatar for dalymiddleboro

Line 34: It's case sensitive so it needs to be Tests_Weight (or change all the others to match Tests_weight ;) )

Member Avatar for jonsca
0
74
Member Avatar for mubdea

Combine this: [url]http://en.wikipedia.org/wiki/Gaussian_elimination#Pseudocode[/url] And this: [url]http://en.wikipedia.org/wiki/Pivoting#Scaled_pivoting[/url] I strongly suggest that you sit down with pencil and paper and work out an example step by step, writing down what you are doing (e.g., I'm multiplying row 1 by a factor of a and added it to row 2, etc. etc. Then …

Member Avatar for jonsca
-2
240
Member Avatar for Alibeg

See this: [url]http://www.velocityreviews.com/forums/t291617-std-cout-and-null-character-pointer.html[/url] (scroll down to post #6). I was looking for the reference in the standard [URL="http://www.slac.stanford.edu/BFROOT/www/Computing/Environment/Standards/C++/cd2/lib-iostreams.html#lib.iostreams.requirements"]here[/URL] but I couldn't find it directly. It seems that passing the null pointer to cout causes the badbit to be set and the output stream invalidated. So that bit would need to …

Member Avatar for Alibeg
0
162
Member Avatar for samsons17

You shouldn't have to clear it out, in fact you want to save it for your totaling and output at the end. When you are incrementing i you are getting the next struct from your array when the flow comes back to the top of the while loop. Maybe I'm …

Member Avatar for DarkC0de
0
142
Member Avatar for pangdo

[code] i = 0; while (fin >> x[i] ) { i++; if( i ==n) //less than elegant but it's off by 1 if you && it in break; //to the loop condition } [/code] What you had was going out of bounds over and over --->fin >> x[n]; (n=20 is …

Member Avatar for jonsca
0
114
Member Avatar for Zay

Write out the class declaration (i.e., what you would put in the header file, [icode] class fractionType{//your declarations here }; [/icode]) and pinpoint specific areas that are giving you trouble. Try it on your own first, then search around in this forum for "rational class","fraction class", "operator overloading fraction."

Member Avatar for NicAx64
0
172
Member Avatar for WhatTheDeuce

See [url]http://www.cplusplus.com/reference/clibrary/cstring/strcmp/[/url] for strcmp. You need to include <cstring> and your strings you are comparing need to be cstrings (so like the char * variety). You can get strings of this format from your C++ strings by using the c_str() method of any string object [icode] mystring.c_str() [/icode]. EDIT: You …

Member Avatar for mrnutty
0
137
Member Avatar for restrictment

I would add another dimension to your array, e.g.: [code] char answers2[5][4][2] = {{{'1','2'},{'1','2'},{'1','2'},{'1','2'}},{{'1','2'},{'1','2'},{'1','2'},{'1','2'}},{{'1','2'},{'1','2'},{'1','2'},{'1','2'}},{{'1','2'},{'1','2'},{'1','2'},{'1','2'}},{{'1','2'},{'1','2'},{'1','2'},{'1','2'}}}; [/code] (has all 12s but you get the idea) or you could use an array of strings to accomplish the same thing (leave it as 2D). You have a '10' in your array which isn't a …

Member Avatar for jonsca
0
114
Member Avatar for grib

I am able to get it to compile, minus a total variable that appears out of nowhere and some cin's that had the << operator instead of the >> (I guess I caught your code before you changed it). It was balking about the signature of the setSales function not …

Member Avatar for grib
0
270
Member Avatar for MrJNV

genre should be of type songCategory in your struct instead of string. Then your other code should work. Also, you do not need to specify the =0, =1, =2etc in the enum itself since those are the default values so you can have enum songCategory {ROCK,ALTERNATIVE, etc,etc}

Member Avatar for jonsca
0
156
Member Avatar for Dewey1040

I'm not absolutely clear on what you are trying to do with the atoi on that line 39. toUpper only works with one character at a time so you'd have to go through each element. The errors you pasted in at the top don't seem to have anything to do …

Member Avatar for jonsca
0
119
Member Avatar for basedon
Member Avatar for manefa3

You're either going to have to be much more specific regarding the aspects of the problem that you are researching or post your code (preferably both).

Member Avatar for manefa3
0
72
Member Avatar for BobFX

Check out the partial keyword:[url]http://msdn.microsoft.com/en-us/library/wa80x488.aspx[/url] I think it's exactly what you need.

Member Avatar for BobFX
0
656
Member Avatar for daeuse

Firstly, please use code tags the next time: `//code here` It makes it much easier to read and maintains the indentation properly. So first thing is get rid of the `return main()` statement. It doesn't do anything. When you complete this while loop you're back in main anyway. There's also …

Member Avatar for jonsca
0
207
Member Avatar for jonsca

Hey all, I'm usually over in the C++ forum most of the time but I had a question that's been lingering for a while. I've got Windows Vista 64. I use Kaspersky AV, 2009 (v. 8.0.0.454,latest DBs) and about 3 months ago the Windows Security Alert (Red Shield with X) …

Member Avatar for PhilliePhan
0
142
Member Avatar for tfmontague

Anytime you are passing in (type a[]) to a method the call is converted into (type *a) where the array is passed in by pointer. I don't believe there is much of a workaround. If you need your original array intact, copy it memberwise into another array and keep that …

Member Avatar for alvinwong
0
87
Member Avatar for Thumb2

Why do you have an extra set of parentheses on the end of your function prototype? Get rid of those and put a semicolon at the end. Also, you probably want to pass in ifstream by reference: void a(ifstream & b) in your prototype, nothing extra required in the function …

Member Avatar for jonsca
0
145
Member Avatar for restrictment

Though check this out (it's for C) [url]http://code.google.com/p/nativeclient/[/url] (I originally heard about it from [URL="http://cplus.about.com/b/2009/08/11/running-c-code-in-your-browser.htm"]here[/URL]) so others have had the same idea.

Member Avatar for jonsca
0
122
Member Avatar for ThomsonGB

I had to look this up so I'm not much good on further questions :) [icode] String ^ kpath = gcnew String(argv[1]); [/icode] It makes sense to me but I don't have much experience with the CLI syntax.

Member Avatar for ThomsonGB
0
139
Member Avatar for kungfudoug

You can declare an array dynamically: see [URL="http://www.fredosaurus.com/notes-cpp/newdelete/50dynamalloc.html"]this[/URL] for a good example. However, if you have been taught vectors there is virtually no reason [I]not[/I] to use them (I could see a case where you had a requirement for very very low overhead). The vector will expand automatically if the …

Member Avatar for Bench
0
115
Member Avatar for kele1

[url]http://www.cplusplus.com/reference/iostream/manipulators/setw/[/url] (it may be right justified by default, I've forgotten) [icode] cout<<setiosflags(ios::right)<<setw(10); [/icode] [url]http://www.cplusplus.com/reference/iostream/manipulators/setprecision/[/url] [icode]cout << setiosflags(ios::fixed) << setprecision(3);[/icode] and be sure to [icode] #include <iomanip> [/icode]

Member Avatar for kele1
0
310
Member Avatar for grafas7

[quote] dont use black screen please [/quote] I'm not sure what you mean by that. No one is going to write the program for you, and definitely not with Borland anyway. Instead, we will help you with what you have coded. In starting out, you should have an array of …

Member Avatar for mrnutty
0
100
Member Avatar for kellnerq

Hint: Only use the outer for loop to control the lines, use the inner for loop to control the number of stars on each line. So therefore, you only need to put in the line breaks at a certain point.

Member Avatar for sidra 100
0
3K
Member Avatar for seam

What code do you have so far and what difficulties are you having with it?

Member Avatar for seam
0
89
Member Avatar for lkegley

I'm not sure I understand why Maximum is a string? If it is you can't use the < with it. This is one of those things that within that loop you need to have a variable called maximum (an int) and one called maxteam(a string), you can test each incoming …

Member Avatar for jonsca
0
101
Member Avatar for C++ Beginner

Based on your specification, you'll need to revamp your code a little bit to use a structure. So you'll need it outside of main() like: [code] struct rainfall_data { int amount; string month; rainfall_data(string monthname){month = monthname;} //you can read anything on class constuctors too because they are //virtually identical …

Member Avatar for C++ Beginner
1
230
Member Avatar for Mclovin1234

Try something like this: [code=c++] for (int i = 0; i < row; i++) { cout << "\nPlease enter the numbers for the "<<(i+1)<<" row: "; for (int j = 0; j < column; j++) { cin >> myArray[i][j]; } } [/code]

Member Avatar for necrolin
0
105
Member Avatar for Snapster5

Well, what is that brace on line 29 closing? Nothing. Your other for closes on line 12. Is there some kind of brace matching in whatever editor you are using? You can use that to run through them. Also, more importantly, you can't just use << with arrays. You need …

Member Avatar for Snapster5
-1
48

The End.