I try to merge all the image resources to a folder called resource. So, set image path as "resource/" but my directX framework only works if I compile at VS 2010. If I run from the debug folder it...
Type: Posts; User: ulti-killer
I try to merge all the image resources to a folder called resource. So, set image path as "resource/" but my directX framework only works if I compile at VS 2010. If I run from the debug folder it...
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
typedef struct{
char code[6];
int year;
char country[26];
} product;
Why Line 82, ' ; ' can make it display only last record?
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
typedef struct{
char code[6];
int year;
char country[26];
} product;
I just compile the code of AndiPersti
12253
bug. :p
#include <stdio.h>
#include <stdlib.h>
int main()
{
int stop, ch, valid = 0;
do
#include <stdio.h>
#include <stdlib.h>
int main()
{
int stop, ch, valid = 0;
do
2) isdigit is not working as scanf("%d") only read the digit and skips the char/string.
1) You mean after getchar() get the newline, it will continue to enter non-stop? So, how many getchar() u put is still the same result.
do
{
// display title
printf("Individual...
do
{
// display title
printf("Individual Salesman Commission\n");
printf("==============================\n");
// show tip for first input
if (*tip == 1)
{
I forget to put break(); :tongue:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
// number of salesman
#define SIZE 100
// salesman_type structure definition
typedef struct{
//int ID; // salesman id
1) Why getchar() needs to call twice if preceding code uses scanf()?
2) How to design to achieve Press any key to continue...?
#include <stdio.h>
int main()
{
printf("Press any key to continue...");
getchar();
return 0;
}
Is there any way to replace system("pause")? :confused:
Is \n also moves to ch too?
Anybody can help me?:biggrin:
http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1044873249&id=1043284392
So, is it means keeping moving the input buffer to ch and reset it just like no input before? Is \n also loved to ch?...
FAQ > Why fflush(stdin) is wrong - Cprogramming.com
Does it matter if behaviour is undefined?
FAQ > Flush the input buffer - Cprogramming.com
I can't understand how it works. :confused:
do
{
// prompt and read salesman id
printf("Salesman ID (NO.): ");
scanf("%d",&stop);
if (stop == NULL)
...
12208
How can I initialize the screen size and screen buffer size each time I run the program?
12201
I mean wat is the side effect if overhead of making a copy of the object?
#include <stdio.h>
int main()
{
// display message
printf("Record deleted.\n");
return 0;
Is this overhead of passing the object by value will consume more memory?