15,551 Topics

Member Avatar for
Member Avatar for AnujSuper9

Hello everyone! So, I've been given an assignment to create something of a simplified Scrabble game in C. I'll start of by mentioning that I'm aware of the vastness in similarities between C and C++, but I am more versed in C++ and so I'd consider my C to be …

Member Avatar for jephthah
0
6K
Member Avatar for atman

Hello., I'm very green in c++, and at school we just had a first lesson on pointers to functions, and I'm going over teachers code using debugger and dont understrand why the line age = getInt(IsValidAge); executes before printf, i thought C++ compiler executes lines sequentially. Any help would be …

Member Avatar for Salem
0
154
Member Avatar for hypernova

[code][/code] Hello everyone ! I am still a beginner, and am posting the code in which I have problems - I compiled it in VC++ 6.0 standard edition, and it gave two warnings and no errors. The warnings disappear if i use double everywhere instead of float. the warning (same …

Member Avatar for s_sridhar
0
135
Member Avatar for lanaee

Input a list of positive numbers, terminated by 0, into an array Numbers. Then display the array and the largest and smallest number in it.

Member Avatar for Narue
0
40
Member Avatar for headacheinC

Hi all, I just get stuck with this kind of simple problem. Such a novice i am. Could you help me guys.:$ I try to built the code and for the first procedure i should open first the file. The file which i should opened its depend on the input …

Member Avatar for headacheinC
0
134
Member Avatar for lukethedrifter

Hello: Anyone know of an easy way to cast the unsigned char in[16] in the below code to an LPCWSTR using just the CRT? I tried swprintf but it wasn't working. I've been googling this for a week and appreciate the help. [CODE]/* ****************************************************************** ** Advanced Encryption Standard implementation in …

Member Avatar for Ancient Dragon
0
224
Member Avatar for red999

I am trying to insert a node before another node in a doubly linked list and I have been trying to do for awhile, but I still can't get it =/. I keep getting error whenever I try to display the list after I insert in a new node. Please …

Member Avatar for kvprajapati
0
2K
Member Avatar for 0xCMD

I was trying out a very simple calculator program: Here's the code: [code=c] #include <stdio.h> #include <stdlib.h> // Calculator Program // By 0xCMD int main() { double number1 = 0.0; /* First operand value a decimal number */ double number2 = 0.0; /* Second operand value a decimal number */ …

Member Avatar for Dave Sinkula
0
166
Member Avatar for 0xCMD

This is a newbie question regarding Bitwise Operators in C: The variable original is initialized to 0xABC. [code=c]unsigned int original = 0xABC;[/code] I know that 0xA = 10 in HEX but what does 0xABC mean? Testing it in the compiler I get the following value "2748". But how does this …

Member Avatar for csurfer
0
168
Member Avatar for Benkyou

So here's the thing, im reading a binary file wich is an image. I think im reading this correctly, so i have the whole binary info i red stored in a buffer and i wanna display this in my screen like '0100010010011' is there a way for me to do …

Member Avatar for Benkyou
0
120
Member Avatar for Benkyou

Hi there, this is my first post here so please tell, if im doing something wrong. Ok so heres the the struct [CODE] typedef struct _CMD { char nome[100]; char arg[100]; struct _CMD *prox; }*CMD; typedef struct _sCMD { int cont; CMD inicio; CMD fim; }*sCMD;[/CODE] The function i use …

Member Avatar for Benkyou
0
109
Member Avatar for athlon32

Ok...i've been getting a weird error in Gtk+. I've narrowed it down to this line: [code]gtk_menu_shell_append(GTK_MENU_SHELL(helpmenu5), about);[/code] that gives me this error: [code](packing:5236): Gtk-CRITICAL **: gtk_menu_shell_insert: assertion `GTK_IS_MENU_SHELL (menu_shell)' failed [/code] Now my program compiles, however the menu wont pop up and the terminal prints that error...does anyone know what …

Member Avatar for athlon32
0
116
Member Avatar for red999

Hi, I am writing a program that allows a user to enter a string of 0s, 1s, and x's. The program will then print out all of the possible combinations that a binary number can have with the string. Example: If the input is 1xx0 The output would be 1000 …

Member Avatar for JJS
0
79
Member Avatar for ankushbansal89

i have recently started to learn c programming. while learning i came across a problem in which we are supposed to find the product of divisor of numbers of range upto 10^6. so, plz if someone can give me any direction on this problem.

Member Avatar for ankushbansal89
0
83
Member Avatar for DayOldPorridge

I was wondering if there's a simple way to create a wget-like program in C? If anyone could point me in the direction of a short guide/tutorial focusing on fetching web pages in C, that'd be great. Beej's guide is a bit too detailed, for me -- I just want …

Member Avatar for marco93
0
71
Member Avatar for wislean

hi i need help with my grading program i need to do something so the menu comes up and make it work property i have no idea on my switch statement and how to delete student from list please help me [code] #include <stdio.h> void main() { int ssn[1000]; int …

Member Avatar for csurfer
0
148
Member Avatar for gplkrsna

Hi, Is there a possibility of creating fixed length file in C and when the file is filled up with the contents to the limit of it's size then it should wrap up to include the new contents? Thanks.

Member Avatar for csurfer
0
98
Member Avatar for Aggresive_Mind

If You Want Something To Do, Try This Exercise... Define a human struct that has 3 fields: char name[50]; char gender[10]; int age; Try and use typedef in your program for your struct. Write a program that reads in a text file containing names, ages and gender of cartoon characters, …

Member Avatar for Salem
0
134
Member Avatar for jeremyg

Hi all, Sorry if its a newbie post, but I'm currently trying to finish a program that sorts a binary search tree using the quicksort method. It seems like it should work, but whenever I run it, the program stops at a certain part in the program and encounters a …

Member Avatar for jephthah
0
153
Member Avatar for adarshcu

[code=C] int main() { char *p = "hello all "; printf(p); } [/code] I thought the above code should ve showed a compile time error. but it din , any reason how it worked?

Member Avatar for adarshcu
0
68
Member Avatar for mj85

Hi could someone tell me how to pass a dynamic matrix to a function? Or where I have gone wrong? Thanks for the help! for example: [CODE]void main() { int R,C; /* r=rows, c=columns/* double *A; /* A is the matrix/* /* I dynamically allocate my matrix (not too sure …

Member Avatar for jephthah
0
159
Member Avatar for anydam

I have a whole bunch of files (file0000,file0001....file5000), and want to read them all at once in C. Anybody knows? Thanks!!

Member Avatar for jephthah
0
6K
Member Avatar for DinMan

Hi! I would like to print a text file having some records onto the screen while running my program. Can sumone suggest me the easiest way to do it. I know I have to open the file using fopen() then what...

Member Avatar for Aia
0
89
Member Avatar for seemant_sun

i am not geting the correct output can anybody help me whats the pmistake i have done [code=c] # include<stdio.h> # include<conio.h> void main() { int color; clrscr(); printf("enter any number"); scanf("%d",&color); if(color ==1) printf("violet"); if(color==2) printf("indigo"); if(color==4) printf("blue"); if(color==8) printf("green"); if(color==16) printf("yellow"); if(color==32) printf("orange"); if(color==64) printf("red"); getch(); } [/code]

Member Avatar for William Hemsworth
0
379
Member Avatar for bhagyaraj

Hello,I need help with the following series (sorry I forgot what its called..) 1/1! - 2/2! + 3/3! -4/4!....upto n terms Here's my program : [CODE]#include<conio.h> #include<stdio.h> #include<float.h> void main() { float com=0,j=0,j1=0,ans=0; //variable decl of float type int tillw,i,no=0,fac1=1,fac=1,f1,f2; //variable decl of int type clrscr(); printf("\n\n\t\t *********************************"); printf("\n\t\t ---------------------------------"); …

Member Avatar for bhagyaraj
0
194
Member Avatar for bufospro

Hi all, I would like to help me with a program in C. I would like to make a function that saves 10 float numbers from an user. But I would like to to do this with pointers. My function is called float *save_array(int N) and then I have to …

Member Avatar for Luckychap
0
110
Member Avatar for nagu89

hello. Ive been using a pretty long number in my program . its problem3 of the euler project . Its 600851475143 . What data type do I use for this???

Member Avatar for Ancient Dragon
0
228
Member Avatar for axim1

Please someone helps me with this question I must submit the answer tomorrow. The program is not working properly as is suppose to ; I am not getting the result shown below. Write a program that accepts numbers from the user and stores them in a linked list called allnum …

Member Avatar for s_sridhar
0
109
Member Avatar for kostasxx

so guys, i was thinking about finding a way to create arrays, without knowing their size. for example create an app that takes unsigned long values until EOF and just saves them to an unknown size array. i was thinking that, because the array size could be big, to create …

Member Avatar for Narue
-1
2K
Member Avatar for kostasxx

i need to make a program that finds all primes between some numbers the biggest number is 1000000000. the code that i have works fine, the only problem is that what i thought that would solve this, is too slow [code] #include <stdio.h> int main(){ FILE *fin=fopen("in.txt","r"); int t,n1[10],n2[10],i,j,ex,k; fscanf(fin,"%d\n",&t); …

Member Avatar for vs.vaidyanathan
0
197

The End.