15,550 Topics

Member Avatar for
Member Avatar for tonkata_stoilov

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 …

Member Avatar for gusano79
0
236
Member Avatar for chaacoali

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 …

Member Avatar for chaacoali
0
128
Member Avatar for gem.gonzales.9

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

Member Avatar for Vish0203
0
113
Member Avatar for KasmIR

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 …

Member Avatar for deceptikon
0
243
Member Avatar for rithish

#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

Member Avatar for WaltP
0
512
Member Avatar for SHASHWATH

I have used queue but I cant figure out how to write code to display horizontal(bfs) and vertical binary search traversal

Member Avatar for WaltP
0
207
Member Avatar for shkr

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 …

Member Avatar for Sokurenko
0
284
Member Avatar for saranyak
Member Avatar for Vish0203

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 …

Member Avatar for Vish0203
0
248
Member Avatar for rithish

#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

Member Avatar for Schol-R-LEA
0
120
Member Avatar for rithish
Member Avatar for charles.haselden.3

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 …

Member Avatar for deceptikon
0
265
Member Avatar for JamesWorth

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 …

Member Avatar for DeeperShade
0
225
Member Avatar for Perry31
Member Avatar for rithish
0
73
Member Avatar for dinohead

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 …

Member Avatar for dinohead
0
128
Member Avatar for Marcusflint

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

Member Avatar for rithish
0
173
Member Avatar for rithish

#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

Member Avatar for rithish
-1
159
Member Avatar for ZeQuia

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

Member Avatar for teachMyself
0
129
Member Avatar for teachMyself

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 …

Member Avatar for WaltP
0
267
Member Avatar for pooh1234qwerty

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 …

Member Avatar for deceptikon
0
121
Member Avatar for shanki himanshu

#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?

Member Avatar for MonsieurPointer
0
89
Member Avatar for gem.gonzales.9

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.

Member Avatar for deceptikon
0
101
Member Avatar for finston

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

Member Avatar for deceptikon
0
277
Member Avatar for RReddy1

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,

Member Avatar for Perry31
0
193
Member Avatar for amezn

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 …

Member Avatar for Ancient Dragon
0
66
Member Avatar for starkk

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

Member Avatar for Ancient Dragon
0
191
Member Avatar for I_m_rude

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 …

Member Avatar for I_m_rude
0
152
Member Avatar for ZeQuia

**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.**

Member Avatar for Flowerlady
0
153
Member Avatar for nida.lodhi.7
Member Avatar for devender22

i want to know why the runtime error is coming in this code????? #include<stdio.h> #include<conio.h> #include<string.h> int main() { char *a,*b; scanf("%s",a); printf("%s",a); return 0; } there was no error when a declared first pointer i.e. a but as soon as i declared the 2nd pointer(b) i am getting a …

Member Avatar for Ancient Dragon
0
120

The End.