407 Posted Topics
Re: You're having a problem with scope. You declared it in the main function, as well as within the do statement. Therefore when you set it in the do statement it will set the variable in the do statement, but will not set the variable in the main function. In the … | |
Re: First, the switch statement must be contained within a method. Also, there should not be a semicolon after [icode]switch (s)[/icode]. | |
Re: Take a look at [URL="http://msdn.microsoft.com/en-us/library/8etzzkb6(VS.71).aspx"]http://msdn.microsoft.com/en-us/library/8etzzkb6(VS.71).aspx[/URL]. The rename attribute doesn't actually rename anything within the DLL, it simply gives an alias for any property to avoid naming conflicts. | |
Re: One thing I might recommend, is adding some header information to the file. It may not be necessary for your needs, but you may want to simply add some version information, just in case you modify the way data is stored in that file extension. Then you can check that … | |
Re: I always though it was executed after the entire expression, however if you run this code: [code=C#]class Program { static void Main(string[] args) { int i = 0; int d = (i++) + (i++); Console.WriteLine(d); Console.ReadKey(); } }[/code] It produces 1. Therefore the postincrement must be evaluated directly after the … | |
Re: The default constructor is just used when no other constructors have been declared. To create a no-arg constructor (override the default constructor): [code=c++]class MyClass { public: MyClass(); }; MyClass::MyClass() { //some code... }[/code] | |
Re: Well, the file shown in the image says it uses UTF-8 encoding; try using the UTF8Encoding class instead of the ASCIIEncoding class. | |
Re: Setting the console font is platform dependent, therefore you'll need to use the Windows SDK for this. Take a look at [URL="http://msdn.microsoft.com/en-ca/library/ms682073(VS.85).aspx"]http://msdn.microsoft.com/en-ca/library/ms682073(VS.85).aspx[/URL] for console functions. | |
Re: The problem is that it cannot find the class com.sun.gluegen.runtime.DynamicLookupHelper when initializing a GLCanvas. Did you include the gluegen-rt.jar library in your classpath? | |
Re: When you create a new array, the elements in the array are not initialized to any default value. Therefore whatever happens to be in the memory where the array is created, it will be that until you assign a new value to it. So if you want it to default … | |
Re: The [icode]new ThreadStart(Method1)[/icode] simply encapsulates a method that will be called when the thread is started. The [icode]new Thread(new ThreadStart(Method1))[/icode] creates a new Thread object that can be used to reference the thread and start running the thread, with the starting point Method1. Hope this helps. | |
Re: Could you please post some code? I just test the method, and it seems to work fine for me. You could try repainting the tabbed pane, although it shouldn't make a difference. | |
Re: A few things: first of all, make the second if statement else-if; second, make the last else-if statement else. Also, pushups should be >50/>30. You should be more carefull with your brackets too: [code=c++]if ((age >= 18 && age <= 30 && sex == "m") || (age >= 18 && … | |
Re: I don't believe that support for these methods will be removed in any future release, for backwards compatability. The reason for it being marked as obsolete is because when suspending a thread, you cannot determine where in the method the thread suspends at. Instead, you should generally use a boolean … | |
Re: In order to use a native library, you would need to use the Java Native Interface found at [URL="http://java.sun.com/javase/6/docs/technotes/guides/jni/index.html"]http://java.sun.com/javase/6/docs/technotes/guides/jni/index.html[/URL]. You can then interact with the DLL using C/C++ (and some others I believe). | |
Re: It's most likely trying to load a JAR file, in the bin folder relative to the location of the EXE. So if you have the examengine.jar file, you should put it in a bin folder, which should be in the same directory as the EXE. | |
Re: The FileStream.Read method uses the offset to define a position in byte array, not in the file, file position is 0, and increases each time a byte is read from the file. Or you can use FileStream.Seek to set the position, which uses type long. | |
Re: First, the DLL's required for the executable in the Debug folder, are used for debugging purposes only, therefore you should always use the executable in the Release folder when distributing an application. I don't know much about VB6, however it is my understanding that VB6 programs require runtime files. This … | |
Re: Correct me if I'm wrong but I don't think your actually intending to read the file as binary. Your file contains the "characters" 0069... So 0 would give you 48, 6 would give you 54, etc. according to ASCII. Try taking out the ios::binary flag. | |
Re: I believe what you are looking for is the EnumPrinters function in the Windows API. [URL="http://msdn.microsoft.com/en-ca/library/dd162692(VS.85).aspx"]http://msdn.microsoft.com/en-ca/library/dd162692(VS.85).aspx[/URL] | |
Re: Well, one way you could go about it, is using the Dictionary class (in System.Collections.Generic). Set the key to string and the value to integer (Dictionary<string, int>). Then for each column, first check if the Dictionary contains the key, add one to its value, if not create a key and … | |
Re: If you are using Visual Studio, there is an option in the project properties, to make it either a static library (.lib) or a dynamic library (.dll), or any other IDE should be similar. Then you can simply distribute the library and header files. Then the header files will need … | |
Re: I believe this is what you are looking for: [URL="http://msdn.microsoft.com/en-ca/library/system.windows.controls.mediaelement.aspx"]http://msdn.microsoft.com/en-ca/library/system.windows.controls.mediaelement.aspx[/URL]. This uses the WPF, I'm not sure if you can use this with WinForms, if not and you are using them, I believe the DirectX SDK has support for video. | |
Re: An instance method is called by referencing an instance to a class. Therefore it can reference any member in the instance of a class. A static method is called by referencing the class, it can only access other static members of the class, since it is not related to any … | |
Re: When you refer to Form, do you mean you are using the VC++/.Net framework. If this is the case, you can try simply setting the DoubleBuffered property (protected member I believe). | |
Re: In HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run you can put your program to run on startup. There is also similar keys in each users registry (if it isn't meant for all users of a computer). | |
Re: Well, you could simply use the Split method (e.g. [icode]str.Split('%');[/icode]). Every even, or 0, numbered index in the string array would be the regular part of the string, and every odd numbered index would be a mask. Hope this helps. | |
Re: Try [URL="http://lmgtfy.com/?q=graphs+in+c%23"]this[/URL]. | |
Re: You need to add a reference to the class library. Right click on References, click Add References..., click on the project tab, and add the library. This is assuming the class library is in the same solution. Also I am using 2008 express, so it might be slightly different. | |
Re: First of all, the while statement would never evaluate to true, therefore [icode]A->next = A;[/icode] would never execute. The next statement [icode]B->next = B;[/icode], would remove all references to any subsequent nodes in the list. The statement [icode]if (A < B)[/icode] is most likely not a good method to use. … | |
Re: Where are the declarations of dnode and the include function? Other than that, quickly looking through the code: [icode]if(val1 < val)[/icode] would not work, since there is no declaration for it. I am assuming you meant something like [icode]if(val1 < p->val)[/icode] Also the statement [icode]*p->next;[/icode] would not do anything. It … | |
Re: Here is a pretty good tutorial on SQL [URL="http://w3schools.com/sql/default.asp"]http://w3schools.com/sql/default.asp[/URL] | |
Re: Try [icode]str.Split(new char[] {' '}, StringSplitOptions.RemoveEmptyEntries);[/icode]. | |
Re: Since Finder is no longer a subclass of thread, you cannot store a Thread reference to it. Use [icode]Thread thread0 = new Thread(new Finder(target, 0, 249));[/icode] | |
Re: I believe you can use [icode]"%programfiles%"[/icode] and it should result in the path [Default drive letter]:\Program Files\. Edit: If not you can use [icode]"%SystemDrive%\\Program Files\\"[/icode]. | |
| |
Re: You need to declare the [icode]FileNotFoundException[/icode] in the signature of any constructors, because any variables that are initialized in the field declaration, is like it being initialized in the constructor (before the body of the constructor is executed). [code=java]public CityPanel3() throws FileNotFoundException { ... }[/code] You cannot surround it with … | |
Re: You could use a Thread and a loop that simply checks to see if the drive is accessible with each iteration... | |
Re: You can use the [ICODE]CheckedChanged[/ICODE] event of the radio button, then set the [ICODE]Text[/ICODE] property of the text box. | |
Re: I don't know how you went about implementing the printing, but you can create a PrintDocument, then call the Print method. It does not show a Print Dialog, since you can manually set the options. | |
Re: If you set TabStop to true, it should work for you. I believe that scrolls bars are generally not selectable. | |
Re: The nodeType struct should be declared outside the main function. | |
Re: You need to set the rand seed value, use [icode]srand()[/icode]. Unlike Java and C# the seed value, when not set, is the same every time it is run. I suggest using the current time to set the seed value. | |
Re: By complete, do you mean not an empty string, or do they need to meet some criteria? | |
Re: If my math is correct,[code]x(n) = x + r*cos(a + n*pass) y(n) = y + r*sin(a + n*pass)[/code] where [icode]0 <= n < vertex[/icode], x and y is the center point, a is the angle of the first point to the right of the center point from the horizontal(counter-clockwise) and … | |
Re: Try using [icode]const char*[/icode] instead of a string, since string is a class but LPCSTR is a character array. | |
Re: For your last question, yes it is because the character 0 has a value of 32 I think. The character with the value of 0, or NULL, is '\0'. For the first part, [icode]char names[][90][/icode], would not work because it would 0 char arrays of size 90. As for [icode]char … | |
Re: It's possible to use: [code=java]Runtime.getRuntime().exex("rundll32 [dll],[entry point] [parameters]")[/code] You can probably find which DLL to use if you search google some. | |
Re: If you are using Windows, I believe DirectShow has recording capabilities. |
The End.