15,552 Topics
| |
How can i give an icon to the exe file produced after executing my code?? is it possible?? | |
Hello! I have what I want to print to file current printf-ing on my console. Can I have some help getting it to do the same, only this time to file please. I can't get it to work. Many thanks for(i= 0; i <= k; i++) { add = (unsigned … | |
Absolutely new to C. I just downloaded Code::Blocks with MinGW and tried to build my first piece of code and I got this strange message: Linking console executable: bin\Debug\intro1.exe Execution of 'mingw32-g++.exe -o bin\Debug\intro1.exe obj\Debug\main.o' in 'D:\Documents\intro1' failed. Nothing to be done. And I don't know what to do. Any … | |
Can someone please tell me what is wrong with this code int main() { char str[10],str2[10]; int k,i=0,j; printf("enter de string\n"); scanf("%s",str); k=strlen(str); printf("length of de string %d\n",k); for(j=k-1;j=0;j--) { str2[i++]=str[j]; } printf("%s",str2); for(i=0;i<k;i++) { if(strcmp(str,str2)==0) { printf("palindrome"); } } return 0; } this is my output enter de string … | |
#include <stdio.h> #define p printf #define s scanf main() { int q,num[2000],sum,i,a,b; float mul,t,grade,quiz,d; { p("enter the the total quiz:"); s("%f",&t); p("enter the no. quiz:"); scanf("%d",&q); p("enter five no sepeerated by enter :\n"); for(i=0;i<q;i++) s("%d",&num[i]); sum=0; for(i=0;i<q;i++) sum=sum+num[i]; p("the sum of array :%d",sum); mul=sum/t; p("\ntotal:%f",mul); grade=mul*100; p("\n total is: %f",grade); … | |
Hello, I try to compilate this progam! It return "Error 4 error C2664: 'LoadLibraryExW' : cannot convert parameter 1 from 'char *' to 'LPCWSTR' c:\users\andrei\documents\visual studio 2010\projects\test\test\test.cpp 282 1 test Error 3 error C2664: 'LoadLibraryW' : cannot convert parameter 1 from 'LPCSTR' to 'LPCWSTR' c:\users\andrei\documents\visual studio 2010\projects\test\test\test.cpp 200 1 test … | |
#include <stdio.h> #include <stdlib.h> struct data { int n; }**value; int main() { int m,c=0; printf("enter the number: "); scanf("%d",&m); value[1]->n=m; for(value[2]->n=0;value[2]->n<=value[1]->n;value[2]->n=value[2]->n+1) { c=c+value[2]->n; } printf("%d",c); } it takes the value and compiler stops working | |
I have used queue but I cant figure out how to write code to display horizontal(bfs) and vertical binary search traversal | |
i have the log file with byte dump and also structures.. using byte data as input i need to print the values of structures in user readable format..can anyone post the code.. here is txt file.. 002c2a54:00000000 00001389 11950000 00000000 00000000 00002b74 0000011c 00000000 002c2a74:01010100 01000000 0e600384 00000000 00000384 00000000 … | |
Is there any way to create an installer using C programming..? I want embed all the files of a software created by me in an exe file, which will extract all the things to a desired folder or drive. I heard that we can make batch file(package).. but how to … | |
#include <stdio.h> #include <stdlib.h> struct rithish { int roll; char name; }*s[20]; void main() { struct rithish *s; int i; for(i=0;i<2;i++) { printf("\n\n\t Enter roll : "); scanf("%d",&*s[i].roll); printf("\n\n\t enter name: "); scanf("%s",&*s[i].name); } } is it possible to do structure variable as pointer to array | |
I am trying to build a tic tac toe program for an assignment. My trouble is making a dynamic array, I am new to c and my understanding of pointers and malloc is still very limited. I would like a resource I could read or an explination of how malloc … | |
Hi! I'm new in this forum. I was reading some other posts about Directx and so. Now I have a problem with Lightning in Directx. I wanted to do some graphics like minecraft's ones, with cubes. And when I got my cube class ready, i drawed one cube and that … | |
Hi, Which are useful algorithms i implement for simple project?? | |
Basically how can I do it? The values I want to read (going to be writing to file later) are hex pairs meaning the values are stored across more than one address location. The first value is stored at pointer address 12feac, the next pointer is at 12feb0 So reading … | |
Hello, I just cant figure out why i get this output. When i run this program, i get the output as 11 11 11, how ? shouldn't it be 11 10 10 ?? Please explain... #include<stdio.h> #define MAX(x,y) (x)>(y)?(x):(y) int main() { int i=10,j=9,k=0; k=MAX(i++,++j); printf("%d %d %d",i,j,k); } Thanks!! … | |
#include <stdio.h> #include <stdlib.h> struct student { char name[15]; long int regno; struct employee { char name1; int rollno; struct student s1 }s1; }s2; void main() { struct student s1={"rohinn",2345} prntf("%s",s2.s1.name); } error at line 12 | |
I have a question, how can i use two different sets else if statements that will work properly? i tried it normally but the second set of else if statements dont work at all. please help. thanks | |
I am trying to learn C and have written a simple program that accepts the string from user and prints it. Would you loke to suggest me anything on my practices? I need to learn it very well. so please help me improving myself. Here goes my code: //Dynamic Array … | |
char str[]="qwerty"; char *p="qwerty"; str++; \\error *str='a'; \\works p++; \\works *p='k'; \\error whereas, char str[]="hello"; char *p="hello"; str="tell";\\ error p="tell"; \\works strings point to themselves like arrays then why is str="tell"; \\error an error?? is the case same for arrays?? please explain the reason for every line. also, why can't … | |
#include<iostream> #include<conio.h> using namespace std; struct node { int info; node *left,*right; }; int main() { struct node *root; root=NULL; //root->info=NULL; //root = (struct node*)malloc(sizeof(struct node)); if(root==NULL) //cout<<root->info; cout<<root->info<< " "<<root->left<<" "<<root->right<<"\n"; getch(); return 0; } why it is giving an error? | |
think a program that you can combine decision ,looping,recursion,array and function i find it hard to think a program that you can incoperate it all. | |
I am using Code::Blocks and mingcc to produce an executable from some heritage c code circa 1998. Compiles OK. Linking problems. Even though I can use the Code::Blocks IDE to see where the parameters are declared in header.h files and implemented in main code c files, I get "undefined reference" … | |
2012-08-01 20:57:32.547,ERROR,AuthenticateMethod/4, Response code=M2 2012-08-01 20:57:33.053,INFO,PaymentMethod/3,PAYMENT Response Code=0001 Hi, I have a file containing comma seperated text as above. i need to parse this text and count how many times "AuthenticateMethod/4" and "PaymentMethod/3" these methiods are present in the file. Can you please help me in this regard? Regards, | |
Hi, i want to know the code which will detect the same number in an array in quick sort program using C, for Eg: if the push element has a 56 of number while i enter the same number 56 in an array it should show the printf statement... i … | |
#include<stdio.h> #include<stdlib.h> int input(int *a) { int n,i; printf("enter the no of elements:"); scanf("%d",&n); for(i=0;i<n;i++) { printf("enter the element:"); scanf("%d",a++); } return n; } int key_input(int *a,int key) { int k; printf("enter the key value which have to be searched in the array of no's provided:"); scanf("%d",&k); return k; } … | |
| hi... Can you please help me by giving only some HINTS of algorithm used to solve this. I AM NOT ASKING ANY CODE OR SNIPPET FROM ANYONE. I just want hint or algorithm to use... There is a linked list where some nodes have similar number. Sort them such that … |
**good day to all! i have a project all about color guess game. i just want to learn about using random functions in words because usually i only see random numbers. anyone can help me to create a source code that will randomize words? thank you! turbo c only.** |
The End.