No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
9 Posted Topics
Re: With people, I tend to just walk away because my temper will overrule any rational thought. With inanimate objects, it depends... I generally give the thing a few chances to comply, but after that, I'll teach it a lesson and perhaps put on a good show for the neighbors. Sadly, … | |
Greetings all; what I'm trying to do is create an array of structs dynamically by using functions for allocation, display, and then freeing memory. I'm *able* to do the process if it's within scope of the foo declaration, but the initFoo function throws an exception. I *think* it's the order … ![]() | |
Re: [QUOTE=;][/QUOTE] I don't have enough coordination / reflexes to use the keyboard and mouse :D. I picked up a usb adapter allowing me to use my playstation controller, which made all the difference. For the games that don't support it natively, I use xpadder. | |
Re: [QUOTE=;][/QUOTE] You might also want to check that you're not dividing by zero before trying that operation. | |
Re: [QUOTE=;][/QUOTE] if you're not given an opportunity to enter 'y' for a choice, then getchar is *probably* storing '\n' in repeat. To check, try a printf [code]printf("\nrepeat = %d\n\n", repeat);[/code] if so, there's different things you can do; one idea might be something like [code] ... scanf("%d", &temp); while(getchar() != … | |
Re: [QUOTE=;][/QUOTE] you might try something like [code] sprintf(fileparam, "%s%02d.dat", season_var, number_var); [/code] | |
Re: [QUOTE=;][/QUOTE] I'm not sure why you have a menu option to input data, yet at the same time, you're prompting for input with each iteration of the for loop. It seems like you'd need just the one loop. [code] int idx = 0, numbers[100] = { 0 }; do { … | |
Re: [QUOTE=;][/QUOTE] srand should be in main. [code]while(sum1 <= 21 || sum2 <= 21);[/code] above will cause your loop to execute until both sum1 and sum2 are greater or equal to 21, which *probably* isn't what you want. try && instead. I'm thinking you'd likely just want < 21 as well … | |
Re: [QUOTE=;][/QUOTE] assuming the field will be a valid type, you can query the first table for those fields, and then insert them into the second table. in php [code] $res = mysql_query("select productprice, productname, productqty from table_name where id='" . $target . "' limit 1;") or die(mysql_error()); if(mysql_num_rows($res) == 1) … |
The End.