15,551 Topics
| |
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 … | |
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 … | |
[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 … | |
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. | |
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 … | |
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 … | |
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 … | |
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 */ … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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. | |
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 … | |
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 … | |
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. | |
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, … | |
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 … | |
[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? | |
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 … | |
I have a whole bunch of files (file0000,file0001....file5000), and want to read them all at once in C. Anybody knows? Thanks!! | |
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... | |
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] | |
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 ---------------------------------"); … | |
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 … | |
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??? | |
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 … | |
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 … | |
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); … |
The End.