112 Posted Topics
Re: When I recently ported a large project from VC6 to VC2005 I found that it was surprisingly easy. I found warnings on library functions like strcpy(), scanf(), the safer _s variants are now required. and for loop variables which are declared in the loop (e.g. for (int i = 0; … | |
Re: Check out FindWindow(). You'll need the Explorer class name, which is "ExploreWClass". | |
Re: I wonder if you really need to store that much data? Do you expect to populate just a few values within that range? It's unlikely you'd have the memory capacity to support a fully populated vector that large, so perhaps you should consider other ways to store the data. Maps, … | |
Re: You're right, strings contain (ASCII) character codes, not integers. So in this case you need to consider each character in the string and convert it to an integer 1 or 0 before performing your arithmetic. There are a variety of ways to do the conversion, check out atoi() for starters. | |
Re: Yes, a and b in both main() and pewp() are declared on the stack in the same way. As you have identical declarations (just a and b) for each function you can jump into pewp() and it uses the stack allocated by main(). This may be an interesting exercise, but … | |
Re: Too big!! It's not reasonable to allocate that much memory, think of another way. | |
Re: [QUOTE=Traicey;824132]I have tried that but its not working[/QUOTE] You could help us out by indicating what's wrong. :icon_mrgreen: You're incrementing oddCount for even numbers and vice versa. I imagine you only want the totals output after all input has been read, so move the cout statements (with changes recommended by … | |
Re: [QUOTE=everard;824053] The code I've created doesn't work. Can anyone please review my codes? I think there's something wrong with my codes. Thanks.[/QUOTE] Some more info about the problem would be useful. Does it even compile? What happens when it runs? Please use code tags in future, if it's easier to … | |
Re: [QUOTE=Tuhin Chandra;824070] in void match()--->I want to match void getdata() and void stock(). How I can do this. [/QUOTE] You have a bit of work to do. In getdata() you are reading the book details into local variables, so match() can't access it. One approach would be to make title[] … | |
Re: Your declarations in main() are wrong. Use commas to separate the object names instead of semicolons. i.e. stack dough, sauce,cheese,pepperoni,finished; Try that, then let us know if there are other problems. | |
Re: You don't say anything about the output you're getting, but I can see a couple of problems. In this line [code=C++] if ((day>0 && day<31) && (month>0 && month<=12) && year>0) [/code] you're not allowing a day of 31 to be accepted, so make it day<=31. Also, regarding the Febuary … | |
Re: [QUOTE=Talguy;823475]I was wondering if it is possible to create an array of enums like this: [CODE] typedef enum { LABEL, SCREEN_BUFFER, PID, ENABLED, NUM_BYTES } SENSOR; static SENSOR sensors[] = { // formula // label //screen_buffer //pid //enabled // bytes { "Absolute Throttle Position:", "", "11", 1, 1 }, { … |
The End.