15,300 Posted Topics
Re: I agree, I don't really like the preview either as it seems confusing at times. A checkbox or control panel option to disable it would be nice. | |
Re: When you want to add a line to the end of a file you don't have to rewrite the file, just open with "a+", which will open the file for update and move the pointer to the end of the file. See more detailed description at [this link](http://www.cplusplus.com/reference/cstdio/fopen/). | |
Re: [edit]^^^ exactly as Mike posted above. The best way to do that is to create a virtual function in ExtraTerrestre class named putAlien() then override it in each of the derived classes. With that, line 28 in the code you posted will call the correct function in the derived class. … | |
Re: what compiler are you using? I presume it's Turbo C on MS-DOS. What you have to do is scroll the whole screen up one line then print something on the blank line at the bottom. Wait awhile then repeat the process. It's not going to look as smooth as you … | |
Re: See answers [here](http://www.programmingforums.org/thread47023.html) | |
Re: Dani has changed it in the past, but never for a specific holiday. | |
Re: >the source codes should not be copied from the internet.. > pls send me the code and how it works.,.and what language So you're asking us to help you cheat?? | |
Re: You need to pass the head of the linked list by reference rather than by value. That means functions need two stars, not one. For this function, since you are adding the new node to the head of the list an if statement isn't necessary. But you see that it … | |
Re: Maybe it would be easier to debug if you wrote a small program with main() that tests that class. That way you can test it without trying to debug your entire game at the same time. | |
Re: You need to check that the file was opened successfully. Put this after line 16 if( !infile.is_open()) { cout << "Error opening file\n"; return 1; } line 19: move the declaration of x up outside the loop so that it can be used to index into the array. line 20: … | |
Re: line 10: You are treating modify as if it were of type std::string, it isn't. modify is of type char\* and character arrays don't have methods like begin() and end(). lines 3-5: What is the purpose of those lines? You can't convert a single character as you declared on line … | |
Re: You need to check the ocx versions before replacing it, you could render your computer unusable if you replace an existing ocx with an older version. Have you tried to re-register it? [Here are some tutorials ](https://www.google.com/webhp?source=search_app#hl=en&tbo=d&sclient=psy-ab&q=how+to+register+an+ocx+in+windows+7&oq=how+to+register+an+ocs&gs_l=hp.1.1.0i13l4.0.0.1.1290.0.0.0.0.0.0.0.0..0.0.les%3B..0.0...1c.2gW31Hh_7J0&pbx=1&bav=on.2,or.r_gc.r_pw.r_qf.&fp=9eb487146e9930b&bpcl=39314241&biw=1039&bih=529)on how to do that. | |
Re: The way I read the problem is that the program should print either 0 or 3 depending on the time. There is no equation for that, just a simple if/else statement. | |
Re: The reason yours won't compile is because two stars means a 2d array, but the array you declared is a 1d array. int array[] ={1,2,3}; int *p_array = array; p_array[1] = 99; // or the last line could also be `*(p_array+1) = 99;` | |
Re: when you compiled it did you check to see if there are any errors or warning messages? Also, use Windows File Explorer to see if the executable exists in the project folder. | |
Re: >if ("symbol = +") When doing comparisons you have to use == operator, what you have above is an assignment operator. Don't get the two operators confused even though they look alot alike. Second problem with the above line is remove the quotes and put ' around the + symbol. … | |
Re: The problem is open() fails because you're trying to open the file for reading when the file doesn't exist. The file must exist in order to use ios::read flag. | |
Re: Are you trying to do something like this? class base { public: base() {x = 0;} protected: int x; }; class derived : public base { public: derived() {x = 1;} protected: int y; }; void foo(base* b) { derived* d = static_cast<derived*>(b); // <<<< this line } int main() … | |
Re: One way to solve it is to keep track of the original row numbers and the sum for each row, then when the rows are sorted the program will remember the original row numbers. Expand the array by two columns to do that int tekmovalci[rows][cols+2]={{7, 6, 9,0,22}, {8, 7, 8,1,23}, … | |
Re: Why allocate new memory for those links? You can just move the link from the original linked list to the new linked list and adjust pointers accordingly. No need to allocate new memory or delete old nodes. Your function is causing a lot of memory leaks because none of the … | |
Re: That is a poorly written program becuse it passes the vector to PlayWithStrings() by value instead of by reference, causing the program to duplicate the entire vector on each entry to that function. What compiler and operating system are you using? | |
Re: line 11: i+4 should be i+=4, the value of i is not getting incremented in your program. | |
Re: >>"linker error undefined reference to mciSendStringA@16" That is a completly different problem. It means it can not find the code to that function which is probably in a library somewhere. You need to find out what library that function is in and then add it to your project. | |
Re: It seems the only place where that would be useful is in the Community Center forums. I don't see any threads on the first page of any of the other forums where anyone with more than 0 checksmarks have started threads. ![]() | |
Re: You are probably trying to create the list box before the dialog box is created. Move the code to just before the return statement in OnInitDialog() as shown [here](http://msdn.microsoft.com/en-us/library/fwz35s59(v=vs.80).aspx). | |
Re: If you handle the event in your derived class then your derived class will get the event, not the parent(s). Parent class will only get the event if your derived class calls it. >If you have supplied a handler for a specific message, or for a range of messages, in … | |
Re: >gd=DETECT,gm,errorcode; Line 23: What is that trying to do? >if I enter 500,600,180,250 i am getting BLANK SCREEN. Print out the value of the calculations, x and y are probably off the screen. | |
Re: what compiler do you want to use? If you use C# and Visual Studio 2012 the IDE will generate a lot of the code for you. If you use Visual Studio 2010 you can create a CLR/C++ Windows Forms project which will also generate most of that program. For some … | |
![]() | Re: I see that the list changes each time you click on your profile and whenever you refresh the browser when it's already in your profile. Wouldn't it be easier to just give us a complete list and let us check the members we want to entorse? Or is the complete … ![]() |
Re: The requirements for any given degree varies from one college/university to another. You have to ask the school you want to attend about its requirements. Most schools I know about have catelogs that describe the requirements for a degree. | |
Re: >it's my understanding that IMissile* Create() (line 5) just points to the location in memory where a missile is created i.e IMissile* IMissile::Create() is that correct? No. The static keyword says that there is only one copy of the function that is used for all instances of the object. All … | |
Re: To extend a little what phorce wrote, the pointers don't have to be pointers to arrays, but can be pointers to a single object such as a single integer. What exactly to pass to Func depends on how Func() is written. It could be either of the following, depending on … | |
Re: live 5 more years lose some weight see my great-grandchildren (none yet) go bungee jumping go skydiving win the tax-free lottery | |
Re: There is no such thing as Windows 2008, you probably mean Visual Studio 2008? If you want to write plugins for Visual Studio then read some of [these links](https://www.google.com/webhp?source=search_app#hl=en&tbo=d&sclient=psy-ab&q=visual+studio+plugin+development&oq=visual+studio+pl&gs_l=hp.1.1.0l4.0.0.1.320.0.0.0.0.0.0.0.0..0.0.les%3B..0.0...1c.UnqTzfbhwCI&pbx=1&bav=on.2,or.r_gc.r_pw.r_qf.&fp=87ce17bb4aae0186&bpcl=38897761&biw=1097&bih=545). Note that this is not for c++ language or compilers, but to extend the Visual Studio IDEs. If you want to … | |
Re: You are using a function that has been depreciated, not intended to be used in new programs. http://www.sqlite.org/c3ref/free_table.html >This is a legacy interface that is preserved for backwards compatibility. Use of this interface is not recommended. | |
Re: I thought it was just my isp, but apparently not. It's working normally now. | |
Re: You have to compile that with a resource compiler, not a c++ compiler. What filename did you give that code? It needs to have .rc extension. | |
Re: if you want to read all the lines in the file then make line 26 a while statement, not an if statement. >strEmployeeCategory == "J") You can't do that with character arrays. You have to call strcmp() to compare two character arrays like this `if( strcmp(strEmployeeCategory, "j") == 0)` strcmp() … | |
Re: put lines 1 thru 8 in a header file put the remainder in a .c file at the top of the .c file include the header file that you created in the first step create the make file Once you do the above you need to finish writing the functions … | |
I'm trying to figure out how to set up RSS feeds for specific DaniWeb forums. How can I find out what valid forum ID numbers are? [This page](http://www.daniweb.com/rss/pull) says to set it to 0 for all forums, so what if I only want C and C++ forums? | |
Re: >i need turbo c soft for 64 bit.. There is no such thing. Turbo C was written only for MS-DOS 6.X and earlier (mid 1980s). It will not run natively on any modern version of MS-Windows. But not all is lost, you can get [DoxBox](http://www.dosbox.com/) and run Turbo C in … | |
For all our non-American friends here at DaniWeb this is a video that shows you what Black Friday means in America. http://techcrunch.com/2012/11/23/a-glimpse-of-the-apocalypse-walmart-customers-fight-over-phones-on-black-friday/ | |
Re: If the user has to enter integers why are you using a std::string array? Why not an int array? The loop on line 8 is incorrect. Arrays are always numbered from 0 to the number of elements, for example if the array has 5 elelements then they are numbered 0, … | |
Re: I don't know what compiler you are using, but this works (your second attempt) with vc++ 2012 Express. Maybe the problem is caused by something else in your program. #include <iostream> #include <fstream> int main() { long length; std::ifstream is("l.2"); is.seekg (0, std::ios::end); length = is.tellg(); std::cout << length << … | |
Re: USA --baseball --football --basketball --ice hockey | |
![]() | Re: testing bump >I am concerned that this will lead to people posting "bump" and other such empty content just to get their names in the bar. Nope. It apparently doesn't work like that. once the thead is marked solved the bar doesn't change when new posters add to the thread. … |
Re: >And did it make you think windows is better mac os x operating systems? Anything is better than mac os x :) I have a friend that has it on a notebook, always crashing and corrupting files. |
The End.