868 Posted Topics
Re: Since you know the indexes, the number of indexes, and they are in sequence, all you have to do is, [code] // comment : Number of Indexes = N; // comment : Index Array = Index[ N ]; Current_Index = 0; Loop_Counter = 0; While Current_Index < N If Index[Current_Index] … | |
Re: [code=cpp]cout << n1 << " + " << n2 << " = " << n1+n2 <<endl;[/code] | |
Re: I like IE7. IE6 sucks. Only used Firefox whenever possible when it was IE6. Made sure that FF was my default browser too. But right now, I use IE7 as much as FF. Out of habit, sometimes I click the FF button in the quick launch panel, but now the … | |
Re: Why don't you just [URL="http://www.fileinfo.net/help/windows-show-extensions.html"]enable displaying file extentions[/URL]? | |
Re: [QUOTE]// program computes the sum of all even numbers from input number[/QUOTE]This part of the objective does not make sense to me. Care giving a sample input number, like 12, and explaining what the expected result would be? Right now it gives the result [code]1 + 2 + 3 + … | |
Re: I have not used eclipse, so I don't know exactly what steps are needed. But I don't think there is any problem with your eclipse version. Looks like you are adding the source file to the [icode].settings[/icode] folder. Also the file does not have the extension of a C++ source … | |
Re: [URL="http://www.cplusplus.com/reference/clibrary/ctime/"]time.h[/URL] | |
Re: Explain. How do you get the filename that you want to open? What is the significance of the input number and the file you want to open? When you say open, does that mean open using a browser, or just using fstream or fopen? | |
Re: [QUOTE=kako13;530129] Asig 2.cpp In function `void ManiMatrix()': 31 [/QUOTE] I don't see anything wrong with [ICODE]checkIfMagic[/ICODE]. But what is this function [ICODE]void ManiMatrix()[/ICODE] in the first warning? Also make sure that [ICODE]Mani[/ICODE] is not a misspelling for [ICODE]Main[/ICODE]. | |
Re: make the following changes to the set function. [code=cpp] void LList::set(int c, int val) { int i = size-1; current = head; while ( current != NULL ) { if(i==c) { current->data = val; //cout<<current->data; break; } else { current = current->next; i--; } } } [/code] You can easily … | |
Re: Maybe [url=http://www.busybox.net/lists/busybox/2000-June/000051.html]this[/url] should help. Not sure though. | |
Re: [URL="http://www.daniweb.com/forums/announcement8-2.html"]Rules[/URL]. And why are you [URL="http://www.daniweb.com/forums/thread107050.html"]spamming[/URL] the board? I am closing this thread. | |
Re: Right. Now we all know what an address book is. So what has this got to do with C++? | |
Re: You can do something like this. [CODE=CPP] int main() { int num; cout << "Enter an integer (0 to stop): "; cin >> num; while (num != 0) { cout << "Last digit: " << last (num) << endl; cout << "First digit: " << first (num) << endl; cout … | |
Re: The functionality is the same. The only difference is that the maximum delay possible by the second function is greate than the maximum delay possible by the first function. This is because the storable range of long is larger than int. | |
Re: [icode]9999999999[/icode] cannot be stored in a [icode]long[/icode] typed variable. You will have to use a [icode]double[/icode] typed variable. However if you use [icode]double[/icode], you will have to change the condition inside the [icode]while[/icode] statement. I will leave you to figure that out. Edit: Or use [icode]long long[/icode]. Much easier. | |
Re: What part to you not understand? | |
Re: Just a rearrangement and modification of your original code. Look and learn. [CODE] #include <iostream> using namespace std; int main() { int count = 1, number ; int Total = 0 ; while (count <= 5) { cout << "Please input interger " << count << " : "; cin … | |
Re: Try the Borland C++ Builder 6 Webpage. Google for it. | |
Re: What error does the compiler give? At first glance I can't see any problem with the code. | |
Re: You should copy [icode]test[/icode] to a folder in your PATH variable, or add the folder that contains [icode]test[/icode] to the PATH variable. Refer the [icode]Adding to PATH variable[/icode] section in this [URL="http://www.cs.purdue.edu/homes/cs348/unix_path.html"]link[/URL]. | |
Re: Didn't your professor or anybody else at least tell you about this awfully fun site called [URL="http://www.google.com/"]http://www.google.com/[/URL] where you can type [URL="http://www.google.com/search?q=A-Star+algorithm&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a"]A-Star Algorithm[/URL] in that cute little white box and press search to get some really nice links with more than enough information? | |
Re: [QUOTE=honeyS;511385]yup but where to find winskinc6.lib???[/QUOTE] If this is a C++ Builder 6 Enterprise library, look for it inside the Lib folder of the CB6 installation directory. Also read the documentation for this TSkindata thing. | |
Re: Because TMemo is a wrapper for the Windows Edit Box, I don't think you will be able to have different formats for different parts of text in the same memo. I think you will do better using the TRichEdit control. | |
Re: The icon is compiled into a .RES file, which is then linked to the executable file. Think of it like a static library file (.lib file). Once the library is linked and the executable is created, you don't need the lib file to run the exe file. Read [URL="http://www.winprog.org/tutorial/menus.html"]this[/URL] for … | |
Re: [URL="http://www.daniweb.com/forums/announcement8-2.html"]Rules[/URL]. | |
Re: [URL="http://c-faq.com/decl/strlitinit.html"]C FAQ[/URL]. | |
Re: Documentation is not written by the developers for fun you know. Unless you are using fairly well known, well established APIs like the Windows API, the chances that someone who has used the library that you are using reads this post is fairly low. So when you are using a … | |
Re: srand is a standard C++ function. So g++ also supports it. What is the problem you are getting? | |
| |
Re: [URL="http://www.daniweb.com/forums/announcement8-2.html"]Here[/URL] | |
Re: No there is no specific forum for Windows Programming. You can ask in the C++ forum. | |
| |
Re: Asking where the problem is not a question in C++. You have to explain what the problem is, and then we will tell you where it is. One problem in your code is this loop. [CODE=CpP] while (!infile.eof() && (count <=50)) { infile>>names[count]>>scores[count]; count++; sum+=scores[count]; } [/CODE] For some [URL="http://www.parashift.com/c++-faq-lite/input-output.html#faq-15.5"]reason[/URL] … | |
Re: I didn't go through all your code, but shouldn't you be using [code=cpp] cout << " Player " << player<< " wins. " << endl;[/code] instead of [code=cpp] cout << " Player " << check << " wins. " << endl;[/code]? In any case, try to debug this first by … | |
| |
Re: From what I see, you are trying to create the pushbutton inside a menu. Is that what you are trying to do? If so, I don't think you can do that. In any case, there is nothing wrong with the pushbutton line. | |
Re: If you have no previous knowledge of C++ the best thing will be to start by [URL="http://www.cprogramming.com/tutorial/lesson1.html"]learning C++[/URL]. The link has information about editors and compilers needed to write, compile and execute C++ programs. Do you at least know C? | |
Re: Well, you could do that programmatically, but you will need administrative priviledges for that. Wouldn't it be easier to let the user unblock the application by his own accord? After all it is his computer, and it only takes one click of a button. | |
Re: What seems to be the problem? And next time, do not attach the code as files. Usually it is an extra trouble for us to download it and open them seperately. We would prefer it included with the post so we can look at it directly. I have done it … | |
Re: I have forgotten all my Java, so the code may give you compile errors and you will have to fix them on your own. However the algorithm will be the same Try a loop like this. [code=java] int x,y; \* Make these integers */ System.out.println("Enter a positive integer: "); x=Interger.parseInt(input.readLine()); … | |
Re: The timezone information resides in the registry location of [icode]HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones[/icode]. Use the [URL="http://msdn2.microsoft.com/en-us/library/ms724875%28VS.85%29.aspx"]API functions[/URL] for accessing the windows registry to read that information. | |
Re: Didn't you read the links properly? [quote] 6.1 Link From Within the Visual Studio IDE Starting with the header-only example project we created earlier: 1. Right-click example in the Solution Explorer pane and select Properties from the resulting pop-up menu 2. In Configuration Properties > Linker > Additional Library Directories, … | |
Re: Use [URL="http://www.cppreference.com/stdstring/isspace.html"]isspace[/URL] for a check like this. [code=cpp] for(int i = 0; i < iLength; i++) { if(!isspace(strTemp.at(i))) { iSpace++; } } [/code] | |
Re: Something like this will be easy. There are more compilicated methods if you want to break Japanese or Chinese words. Also you can use a callback function to count the words on the fly, but I think this is the most simple way. [code=cpp] #include <string> #include <sstream> // Get … | |
Re: [QUOTE]How to use user32.dll in Dev-C++?[/QUOTE]You give the path of the dll to the library path of DevC++. [QUOTE]Where to find User32.lib ?[/QUOTE] I believe you will have to install the Microsoft Windows Platform SDK to have access those libraries. | |
Re: Use the [URL="http://msdn2.microsoft.com/en-us/library/aa364993.aspx"]GetVolumeInformation [/URL]Function. The Label can be obtained by the [icode]LPTSTR lpVolumeNameBuffer[/icode] parameter. | |
Re: Lookup the documentation of the read function. We can only guess that conf_fd may be a destination data buffer conf maybe the source data buffer 100 is the number of bytes of data that should be read from conf to conf_fd. | |
Re: C++ does not give you a method out of the box for multithreading like Java does. To use multithreading, you will have to use the thread libraries offered by the operating system. For win32 you will have to use [icode]CreateThread[/icode] and in unix you will have to use [icode]pthread_create[/icode]. I … |
The End.