15,300 Posted Topics
Re: > Because C is too old and unusable, i C is older than c++ for sure, but hardly unusable! It's probably the most frequently used language in the world. Even today people are still writing code in C. Before you can begin to convert your program from c++ to C … | |
Re: Maybe you should rethink how the information is displayed. For example, one way to do it is to use a tabbed form where each tab contains only a portion of the total info it now shows. Group the data into logical pages and present only one page, or tab, at … | |
Re: You can't do that with Turbo C++ because it's too old. Get a modern 32-bit compiler such as Code::Blocks or VC++ 2010 Express. Tubeo C++ is a MS-DOS only compiler. | |
Re: Line 83 is asking for the number of items to be deleted, not which product. So the string contains numeric digits. If the product name in the list is in fact numeric digits then the function might work if one of the products happens to be the same as the … | |
Re: VC++ 2010 defaults to precompiled headers which requires stdafx.h. When you create a project you can uncheck that option. If the project is already created you can turn it off in Project --> Properties (last manu item under Projects). > Oh and if you know where to get a good … | |
Re: > my answer to "What kind of device is IPad?" was "Crappy". LOL :) :) I might have answered "i don't know", but then I'm not as smart as a 5th grader (an American TV show) | |
Re: Also see [URL="http://web.daniweb.com/techtalkforums/thread54367.html"]this thread[/URL] | |
Re: I did that on my PC. In disk management, click on the partition you want to split then select menu option shrink volume. | |
Re: Now that we know what you want to do, how about showing us what you have done, and tell us what problems you are having or what you don't understand. No one here will do that problem for you. | |
I'm now logged in with Windows 8 Preview and IE9 on a PC. My only problem is that I don't see the purple bar across the bottom of the screen. Maybe DaniWeb thinks I'm on a mobile device? | |
Re: @Captain: The link you posted is already on the second page. Press the left pointing < and it will take you back to the first page. | |
Re: >>am currently reading a mfc book (professional mfc with visual c++ 6 Top reading that book! The compiler is old, non-c++ compliant, and the version of MFC that it teaches is also obsolete. If you want to learn MFC then get a book that teaches it from VC++ 2010 compiler. … | |
Re: Are you sure you are running Windows 8? That is still in beta testing. | |
Re: First you have to use a loop to find the negative value. Once found, start another loop to compare each of the values from the beginning of the array to the one past the negative number. For example: let int i be a counter that finds the negative number. Let … | |
[rant] I'm not voting for anyone who phones me with political message. So if any of those annoying Republican candidates want the job of President, don't call me again. So far, Mitt Romney is on my shit list. [/rant] | |
Re: The code you wrote is not reading the file. Instead of MyReadFile.eof() do this, assuming MyReadFile is std::ifstream std::string line; while( getline(line, MyReadFile) ) { // blabla } | |
Re: If you are on \*nix you can just can opendir() function with path "\*.ext". If it succeeds then you know that at least one file exists with that exteision. You can do the same on MS-Windows by calling FindFirstFile(). But if you want portablility between the two operating systems then … | |
Re: fputs() is the opposite of fgets(), which is not what you want. You want to call strcpy() or strcpy_s() to duplicate a string. lines 18 and 24 of server.c are wrong too. Remove the & symbol because its already a pointer. | |
Re: Sounds like you need a course in c++, not Eclipse. Eclipse is just an IDE -- a programmer's tool, much like a hammer is to a carpenter. You don't learn how to build a house by asking how to use a hammer. | |
Re: > I also have no idea why the data type "string" is not existent in C++ windows forms applications. Windows Forms is not c++, its CLI/C++ which is a slightly different language. CLI/C++ does not support c++ code or classes like std::string, std::vector, etc. The VC++ 2010 compiler has some … | |
Re: > Try the new formatting help link I'd like to see that link made a sticky somewhere so that we can refer to it easily. | |
Re: > I dont know semaphores and threads Then start learning. Read up on them then write a small program that illustrates how they work. | |
Re: @adityawkhare: You can't generate a message box like you might see on other MS-Windows programs because Turbo C can't access any of the win32 api functions -- its too old of a compiler. Nor can you use any modern GUI library like QT Gui tools previously mentioned. About the best … | |
Apparently Greeks don't like politicians http://www.theblaze.com/stories/greek-newscaster-hit-with-yogurt-eggs-live-on-air/ | |
Re: Neither of the code snippets you posted compile. This is your second example with a couple changes so that I could make it compile, but it also has a problem. The operator << has two parameters, but main() is passing only one parameter. Fix that and both examples will compile. … | |
I get that error when I click the date of loast post in this thread. Doing that on other posts seem to be ok. http://www.daniweb.com/community-center/geeks-lounge/threads/107097/what-jobs-are-available-for-a-person-with-a-mis-degree | |
Re: So, what have you done in the past 16 hours to solve this? (It's been 16 hours since you posted this question). Do you need all the data in memory at the same time, or can you work with one row of data at a time? The difference is the … | |
Re: You can't actually code them as you posted them because the second line will produce a "redefination" error message. Once a macro has been defined you have to undefine it before it can be re-defined. #define PRINT (a,b)cout<<(a)<<(b) #undef PRINT #define PRINT (a,b,c) cout<<(a)<<(b)<<(c) /*trouble?:redefines,does not overload*/ You don't have … | |
Re: I know of no good reason to use malloc() in a c++ program unless you are porting some old legacy program from C to C++. I don't think Tumlee said if can't be used, just that there is no reason to use it. In some cases malloc() can't be used. | |
Re: line 8: I'd make that an unsigned int instead of int because addresses should never be negative number. > line 41 p2 = fopen("argv[start]","r"); remove the quotes from around argv[start] -- the compiler thinks that is the actual filename, not a variable that contains the file name. lines 35 and … | |
Re: > void ProductSummary::ReadProductFile(ProductSummary, ifstream& in_file) Delete the first parameter to that function, its not necessary to pass it. Also in that function use stringstream class to parse the line into its individual words instead of using the string's find() method. stringsteam is a whole lot easier #include <sstream> ... .. … | |
Re: what's the operating system you are using? When you downloaded CB did you download the version that contains MinGW compiler? If not, what compiler are you using with CB? | |
Re: If you just want the longest word then read the file one word at a time, not the entire line. Do that with fscanf(). After a word is read all you have to do is call strlen() to get the word's length and compare it with the length of the … | |
Re: The whole purpose of the up/down arrows is to let members vote anomously and avoid giving rep. IMO its just as easy to enter a comment if you want to give rep and I see no reason to change the system. | |
Re: [See this](http://www.daniweb.com/software-development/cpp/threads/320825/fork-and-wait-in-c) thread for an example of how to use fork() As for what fork() does -- you can read this [man page](http://www.lehman.cuny.edu/cgi-bin/man-cgi?fork+2) | |
| |
Re: Why do you need a tool to do that? Just use Windows Explorer, create a folder and copy the files into it. Simple. | |
Re: what operating system? In MS-Windows I think what you want is to [create a caret](http://msdn.microsoft.com/en-us/library/windows/desktop/ms648398(v=vs.85).aspx) | |
Re: You try it first and post your best shot. You should know that a for loop is coded sometime similar to this: for(int i = 0; i < 5; i++). All you have to do is substitute the variables in what I just posted with what you posted. | |
Re: The new Code button is easier to use than ~~~ tags (less typing) As far as I can tell ~~~ doesn't work any more. | |
Re: line 11: start the value of j = i counter instead of 1 line 14: print the value of j not i, and do not increment it on that line. It will be incremented on line 11. Finally, put a space in the format specifier so that there is a … | |
Re: > can any one help to create an dynamic (2*10) two dimensional array using new and delete? Yes I can. It reuires a loop, and the pointer needs two stars, such as int ** array; Lets say you want to create a spreadsheet-like array with 2 rows and 10 columns. … | |
The replacement for the Quote button (mouse left click to add text already in clipboard) is really very annoying at times. If all I want to do is just put the cursur somewhere, such as at the end of the last line of text already inside the edit box, your … ![]() | |
Re: You are trying to convert the return value of CreateFileMapping() to the wrong type. It already returns the correct type, so no typecasting is needed. | |
Re: You need to put break statement on lines 27 and 30 so that if you select Login the program won't make you register also. > and 1 tips fom my side that opening file mode instead of "wb+"..use "w". No. "wb+" is correct in this program because the structures are … | |
Re: 1. line 9: when calling a function do not include the \[\] in the parameter list `search(array1,array2);` 2. line 13: sizeof does not work for pointers and arrays declared as parameters. sizeof(array1) will always be 4 in 32-bit compilers because array1 is a pointer, not an actual array. sizeof only … | |
http://www.daniweb.com/software-development/cpp/threads/332761/ide-linux Something strange is going on here. When I click [IDE \& Lunix | DaniWeb](http://www.daniweb.com/search/query/%2Anix+distributions/0?q=site%3A%2A%2F+%2Anix+distributions) from the google link all I see are empty posts -- posts that have no text. But when I go to that same thread directly within DaniWeb everything is ok. Same problem with all the … |
The End.