15,300 Posted Topics
Re: >>scanf ( "%s", &rainfall ); %s wants a character array of at least 2 bytes. rainfall is not a character array, so the above will always fail to work correctly. [code] char rainfall[2]; // 1 byte for either Y or N and secnd byte for null terminator scanf ( "%s", … | |
![]() | Re: There are lots of tutorials -- [URL="http://home.netcom.com/~tjensen/ptr/pointers.htm"]here [/URL]is just one of them |
Here's one that was written by Altert Einstein. Can you solve it? (Hint: create a matrix on paper to keep track of who does what) There are 5 houses in 5 different colours. In each house lives a person of a different nationality. The 5 owners drink a certain type … ![]() | |
Re: when declaring a function you must specify the parameter types as well as name. For example [code] double computeUnitCost(int length,int width,int price) { // the code goes here } [/code] It is also necessary to declare the functions before they are used, so you need to put the function prototypes … | |
Re: >> Date.obj : error LNK2028: unresolved token (0A00028C) "public: __thiscall Date::Date(class Date &)" (??0Date@@$$FQAE@AAV0@@Z) The above error (and similar other ones) is telling you that you forgot to code one of the Date constructors. If you look in Date.h you will find that it has two constructurs -- but in … ![]() | |
| |
Re: quite frankly I don't think there are a whole lot of programs out there in the commercial world that use win32 api console functions very extensively -- most programs have GUI front ends. But [URL="http://www.codexxi.com/"]here[/URL] is a link to some example programs. | |
Re: I don't know how much equipment (hardware) you have at your disposal, but one real-world example is: Lets say we are in a factory that manufactures several different kinds of candy. After the candy is put in shipping containers (corrugated boxes) they roll down an assembly line past a barcode … | |
Re: [QUOTE=Line;263974] What is causing this, and how do I avoid it? [/QUOTE] This line is causing it [code] strcat((char *)&midl, &text[i]); [/code] how to avoid it? I can't say because I don't know what you intend for it to do. | |
Re: sort the vector first, then you can use a [URL="http://en.wikipedia.org/wiki/Binary_search"]binary search algorithm[/URL] | |
Re: not possible unless you already have a pointer to it because your program does not know the address of the node and because you also have to remove it from the linked list before deleting it. | |
Re: sounds like you got some very very old and ancient MS-DOS code, such as [URL="http://www.teco.edu/~cdecker/webchip/api/serapi/doc/html/serapi_8c-source.html"]this[/URL] program. To make effective use of the REGS union you need to learn some assembly language, and especially about software interrupts 16 and 21. Those are not useful with any of the moders 32-bit compilers. … | |
Re: took me all of about 2 seconds to find [URL="http://www.google.com/search?hl=en&q=matrix+c%2B%2B+class"]them[/URL] | |
Re: at the end of every other day he will have Rs 5 left. So the answer must be (60/5) * 2 = 24th day. BTY: what is Rs ? | |
Re: One thing is certain, end-of-the-world will certainly cause a crash in the real estate market, so will nuclear war. And prices in New Orleans (USA) plummeted after last year's hurricanes. [quote]That's the situation as it was at the end of the .com boom when many people in IT lost their … | |
Re: use tolower() instead of toupper() in that loop, then just use touper() on the first letter of the first word. | |
Re: >>but can anyone write some code in C using if statements for the following: No! write it yourself, post code and ask questions. we do not do your work for you. | |
Re: read [URL="http://msdn2.microsoft.com/zh-CN/library/a1z81fxe.aspx"]this[/URL] article, and [URL="http://msdn2.microsoft.com/zh-CN/library/82ab7w69.aspx"]this[/URL] one about DATE data type | |
Re: Here are just a few helpful hints: They are not all inclusive and you will no doubt encount other problems during the porting process. 1. rename the *.cpp files to *.c files 2. convert the classes in the .h files to normal structures and make the class methods just standard … | |
Re: >> GlobalMirror2(&GlobalMirror,2); You can't do that after the object has been constructed. You can only do it when actually instantiating the object. You need to write an initializer method or other method that can be called to initialize those classes, something like this [code] GlobalMirror2.initialize(&GlobalMirror,2); [/code] | |
Re: I was wondering what "ally C" is? anything like an "ally cat" ?:) BTW: I have no idea about how to write a disassembler -- although I know an executable can not be disassembled back to C or C++ code. About the best you can accomplish is to generate the … | |
Re: anyone driving that fast diserves whatever he gets. That's called "the theory of evolution at work", or "survival of the fitest". Hopefully he did not pass along his bad genes to any children. | |
Re: Please read [URL="http://web.daniweb.com/techtalkforums/announcement8-3.html"]this thread [/URL]about how to post code inside code tags so that spaces and tabs are preserved. There are also other helpful threads for newbes at the top of this board that contain links to other useful information. Thank you, and welcome to DaniWeb:) | |
Re: >>How do I make sure that my program gets very little priority, but just enough to watch another program This is operating system dependent. In MS-Windows you can call SetThreadPriority() -- see MSDN for details. I don't know how its done in *nix. Can't answer your other questions. sorry. | |
Re: Please read[URL="http://http://web.daniweb.com/techtalkforums/announcement8-2.html"] this[/URL] and post your code when you are ready. | |
Re: mind explaining what you are talking about? | |
Re: According to [URL="http://www.microsoft.com/windows/windowsmedia/player/windowsmobile/default.aspx"]Microsoft site[/URL] that version is still in beta so it may not work at all on Mobile wireless devices. | |
Re: I got the same one -- manybe everybody does??? The most difficult questions for me were to select the picture that was least like the others. my favorits were the brain teasers. Too bad they didn't say which questions were incorrect. | |
Re: Depends on which version of that compiler is used -- 16-bit MS-DOS or 32-bit MS-Windows? 16-bit can create arrays up to only 64,000 bytes (large memory model), or 16,000 long integers. There is no work-around other than to redesign your program or use a modern 32-bit compiler, which is one … | |
Re: its been a long time, but I think you can use it on core files too. If your program produces a core dump you can use gdb on that core file. | |
Re: You know the ID of each text box, right? And you have the HWND of the dialog box that contains the edit controls, right? Then use GetWindowText() for each box [code] char text[255]; // or however long the strings are // hWnd is the HWND of the dialog box HWND … | |
Re: >> cin >> filename; If there are spaces in the filename and/or path the above will not work because it stops at the first space. In that case use getline(). [code] while(!file_in.eof()) //as long as we're not at the end of the file....do { file_in >> temp; //reads file into … | |
![]() | Re: 16-bit api functions are obsolete and were only useful on now dead MS-DOS 6.X and earlier operating systems. Don't bother with them. If you use a 32-bit compiler you can't use them anyway. [URL="http://www.winprog.org/tutorial/"] Here[/URL] is a good 32-bit tutorial that you should learn. |
Re: In C++ functions can have parameters with default values [code] int Test ( int a = 1, int b = 2) { return a * b ; } [/code] now when the program calls Test with no parameters, the compiler will force them to the values shown above. [code] int … | |
Re: it always helps to post the code that does not work. and please use code tags as explained in the threads at the top of this board. | |
Re: 1. Please edit your post to use[URL="http://http://www.daniweb.com/techtalkforums/announcement8-3.html"] code tags [/URL]to preserve spacing and tabs. 2. main() must be declared like this: [code] int main() { // blabla return 0; } [/code] I realize neither of the above answer your questions, but fix those and we will look at your post … | |
Re: [QUOTE=proliant_fan;260738] how old r u when ur in the 8th grade (im in the uk)[/QUOTE] about 13 or so -- and its been 50 years since I was in 8th grade :mrgreen: | |
Re: [QUOTE=lol_hacker101;254131]a minute? pitiful..you call yourself a moderator? whatever the heck that is? lol_hacker101[/QUOTE] A Moderator is someone who likes to answer other people questions or silly comments, such as yours.:) | |
Re: welcome to DaniWeb -- and happy to find someone my own age group.:mrgreen: Hope to see you around these forums a lot. And enjoy that grandson as much as you can, as you know they grow up so fast. I live only a couple hours drive from you so maybe … | |
![]() | Re: 1. step #1 -- go to Add/Remove Programs and remove that old ancient compiler from your computer. 2. Setp #2, to do Microsoft Web site and download VC++ 2005 Express and the Windows Platform SDK. |
![]() | Re: Welcome to DaniWeb -- I don't know a thing about Pyhthon so I can't help you at all with that. Hope you have enjoyable experience here. |
Re: Please use [URL="http://www.daniweb.com/techtalkforums/announcement9-3.html"]CODE TAGS[/URL] All that unformatted code hurts my eyes and greatly reduces the probability that anyone will help you. Also [URL="http://www.daniweb.com/techtalkforums/announcement8-2.html"]we do not do student's homework[/URL]. | |
Re: read the stickies at the top of this form -- that contains lots of information and links, for example t[URL="http://www.daniweb.com/techtalkforums/thread50370.html"]his one[/URL] | |
Re: use the escape sequence character. and to get the '' you need two of them [code] sep = strpbrk(line, "\\<=->/'\""); [/code] | |
Re: that is the right syntax, but it does not allocate enough memory because [b]array[/b] inside the allStatus structure is an array of pointers and each of them must be malloc'ed as well. [edit]Sorry Glorious -- your post was not there when I started writing the above[/edit] | |
Re: my quess is Expr1Column is the name of a function, if that is correct then you need to add the parentheses [code] if (LogInfo.Expr1Column[color=red]()[/color] > 0) [/code] | |
Re: read the stickies at the top of this board -- they will give you lots of information and links. and Welcome to DaniWeb. Please visit Coffee House and introduce yourself.:) | |
Re: I think you will want to investigate [URL="http://www.calculator.org/RPN.html"]Reverse Polish Notation[/URL] as it is applied to calculators. google has lots of information about it. | |
Re: maybe [URL="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_wrcore/html/wrwlkwalkthroughusingcomboboxtochangeformattinginworddocument.asp"]this[/URL] microsoft tutorial will help??? |
The End.