112 Posted Topics

Member Avatar for ashishchoure

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; …

Member Avatar for ashishchoure
0
153
Member Avatar for nsvanjani

Check out FindWindow(). You'll need the Explorer class name, which is "ExploreWClass".

Member Avatar for MrSpigot
0
114
Member Avatar for maru2

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, …

Member Avatar for StuXYZ
0
216
Member Avatar for MegaDave

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.

Member Avatar for Ancient Dragon
0
315
Member Avatar for winrawr

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 …

Member Avatar for winrawr
0
107
Member Avatar for lehe
Member Avatar for nucleon
0
189
Member Avatar for Traicey

[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 …

Member Avatar for Traicey
0
104
Member Avatar for everard

[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 …

Member Avatar for MrSpigot
0
81
Member Avatar for Tuhin Chandra

[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[] …

Member Avatar for MrSpigot
0
108
Member Avatar for danielle23

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.

Member Avatar for danielle23
0
1K
Member Avatar for kiro

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 …

Member Avatar for MrSpigot
0
110
Member Avatar for Talguy

[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 }, { …

Member Avatar for MrSpigot
0
116

The End.