19,876 Topics

Member Avatar for
Member Avatar for Sa_FF

how can i sort in decreasing order? i did the sort is in increasing order [CODE=c] typedef struct{ char name[30]; CARd hand[3]; CARd biggest_card; int nro_victories; }PLAYER; PLAYER h; int m, i, j, k; for(i=0; i<n_playeres-1; i++) { k = j; m = h[i].nro_victories; for(j=i+1; j<n_players; j++) { if(h[j].nro_victories < …

Member Avatar for Sa_FF
0
145
Member Avatar for pidven

i learnt c language but iam not aware of practical applications of c.how this can be used in development of any softwares,webdesigning ,or creating a virus or destroing a virus.can any one show any one practcally so i can be aware of and i will try in furthur applictions. thankingyou.............

Member Avatar for Luckychap
0
111
Member Avatar for sabib

Objective The objective of this assignment is to provide hands on experience of using Classes and Objects Dynamic Memory Allocation in C/C++ Friend Functions Program Write a C++ program that contains a class named Student having following data members: 1. stdId 2. stdName 3. stdAge 4. stdProgram 5. noOfSubjects. The …

Member Avatar for zandiago
0
132
Member Avatar for jirving

i need help on my homework problem. i have done the operations part (+, -, *, /, sqrt) but i am really having a [B]problem on making my calculator accurate up to 40 digits and to truncate all the non-significant zeroes on the output[/B]. i don't know what data type …

Member Avatar for Adak
0
293
Member Avatar for raddix

I have a quick questions regarding a a certain style of coding I have seen that I found to be rather unique. It entails including C files within a program to allow for easy changes of constants and other variables on the fly. This method is used because of the …

Member Avatar for dwks
0
157
Member Avatar for shriagni

how can i convert string os size[10] to float. also i cannot use atof or sscanf. im asked to use bitwise or anyother methos which will take less processiong time. is there anyway. thank you

Member Avatar for Prabakar
0
279
Member Avatar for rob_xx17

hello, I think I have a rather straightforward problem, but I'm relatively new to C. I have an input file that looks like this: [code] 0.682448 0.53791 0.61727 0.48714 0.297144 0.29688 0.40549 0.68233 0.426100 0.62057 0.25095 0.54782 0.673007 0.51040 0.25476 0.35149 0.641339 0.49815 0.54557 0.42673 0.268030 0.38949 0.48841 0.56580 ... …

Member Avatar for Prabakar
0
126
Member Avatar for stephen3200

I am currently experimenting with function pointers as part of a larger project. Drawing from both online sources and textbooks. The problem however is that after storing the values as an array, when i call them the functions either fail to be called, or if i attempt to print the …

Member Avatar for stephen3200
0
110
Member Avatar for ozaidum

I'm wondering how to do this in C: (i need this for my project)... how to replace this line [URL="http://img368.imageshack.us/img368/7854/sp326rt3.jpg"]http://img368.imageshack.us/img368/7854/sp326rt3.jpg[/URL] with a printf & scanf statement? i want to hide those lines and it will be replaced with another statement. and how to make the screen window fixed (meaning not …

Member Avatar for Narue
0
94
Member Avatar for newbiecoderguy

I want this program to calculate an actors age at the time a movie they made was released, the user inputs all the data... I dont know C just learning but this is the layout I thought of any help would be appreciated, this does not compile [CODE]#include <stdio.h> int …

Member Avatar for newbiecoderguy
0
957
Member Avatar for patel_anks

Hi can anyone help me, I am learning the language C but need some help writting some code. what i need to do is from the input of the keyboard i need to find the max and min of some values and out put them. what i got so far …

Member Avatar for patel_anks
0
110
Member Avatar for johnray31

Hello friends, Could someone tell me if i want to read a particular text from a file that exist in each line of file. How could i do this? My text is like this: poll mail.telesys.com protocol POP3 user [email]vipin@gmail.com[/email] password abcd mda "cat > /export/home/m7istp/imcp/bin/ml201.txt now i want to …

Member Avatar for Duoas
0
130
Member Avatar for Sa_FF

i'm trying to do a biggest card game in c but i'm reciving some errors that i can't figure out please help me... the functions are separeted of the main(project) i'm receving the error 'incompatible types in assignment' in the function compare card [CODE=c] /*This function compares card1 with card2 …

Member Avatar for Ancient Dragon
0
279
Member Avatar for xlx16

i want to make a text programe ,this program supposed to have a text mode and a command mode; in text mode you can type and whit arrow key change your position in command mode by typing your comman you can get the results for example: by typing copy 2 …

Member Avatar for Adak
0
145
Member Avatar for HLA91

Hi Guys This has been going on for a while but now I have finally decided to do something about it. A few weeks ago I compiled a small C program from a book I was reading. It compiled fine but I wanted to make a slight change to the …

Member Avatar for HLA91
0
105
Member Avatar for Acidburn

Hey guys I'm new to C#.NET but I'm trying to create my own Form using my own GUI code. However I'm unsure which project I need when using Visual Studio 2008. A normal person would assume that selecting Windows Forms Application would be correct. However you'd be wrong it would …

Member Avatar for vuyiswamb
0
190
Member Avatar for red devils

Hi, i'm new to C programming and i could use some help with an assignment. i would like to store a word in a linked list, with each letter of the word in a separate node of the linked list. i would then like to traverse the linked list to …

Member Avatar for red devils
0
174
Member Avatar for michinobu_zoned

Take the following code: [code]#include <stdlib.h> int main(int argc, char **argv, char **envp) { int sum; atoi(&argv[1]);//statement with no effect. Passing argument 1 of ‘atoi’ from incompatible pointer type atoi(&argv[2]);//statement with no effect. Passing argument 1 of ‘atoi’ from incompatible pointer type sum = argv[1]+argv[2]; //error: invalid operands to binary …

Member Avatar for dwks
0
2K
Member Avatar for sivakrishna
Member Avatar for sunderam

Hi, I need to meaure contrast for an image. Does anyone has any code snippet/documentation that i could use. I have tried looking around alot but couldnt find anything substantial thanks Sunderam

Member Avatar for Salem
0
108
Member Avatar for programmer321

[code] Hello, Please guide me to write how to write a C code for converting Unicodes (like 0905 for अ). the output i.e. अ should be written to a text file. Regards. [/code]

Member Avatar for programmer321
0
242
Member Avatar for NiNTENDU

Sorry for bother you with this dumb questions... I understand very well math but I'm a noob in C... Hope to "evolve" :( Anyway I manipulate a simple binary tree this way: [CODE=C] typedef struct _node *tree; struct _node { char *name; double val; tree left; tree right; }; void …

Member Avatar for NiNTENDU
0
105
Member Avatar for fishwater00

I do not know how to express the array I am going to work with, but some codes can describe them. If I define an array and a struct with member : [code=c] float velocity; MODEL.VELOCITY; [/code] VELOCITY in struct MODEL is also float. then I alocate memory for them; …

Member Avatar for jephthah
0
128
Member Avatar for ramya_bugbuster

hi friends.. how to compare 3 number without using relational operator? do u have any idea?

Member Avatar for jephthah
0
115
Member Avatar for NiNTENDU

Hi, it's me again... I've some problems understanding why my program hang up; I've this code: [CODE=C] #include <stdio.h> void foo ( char **bar ) { *bar = "foobar"; /* Runs perfectly */ **bar = 'b'; /* Cause a crash */ } int main() { char *bar; foo ( &bar …

Member Avatar for NiNTENDU
0
151
Member Avatar for singal.mayank

hello.. I m designing a STATISTICAL SUMMARIZER in C.. This software will create the summary of a text file submitted by the user.. The first step is to separate sentences in the text file.. I hav almost completed this step.. but there are some limitations.. Suppose if text file hav …

Member Avatar for jephthah
0
117
Member Avatar for singal.mayank

hello.. I m designing a STATISTICAL SUMMARIZER in C.. This software will create the summary of a text file submitted by the user.. The first step is to separate line in the text file.. I hav almost completed this step.. but there are some limitations.. Suppose if text file hav …

Member Avatar for singal.mayank
0
164
Member Avatar for fddrummer06

I have a code for a doubly linked list, and I need to print it in reverse. I can't seem to figure out what I'm doing wrong, or maybe I just don't fully understand what I'm doing. The part that I'm questioning is in the printList function. The while statement …

Member Avatar for Ancient Dragon
0
123
Member Avatar for ranseed

Hi, I have this assignment from my information structures class that is kicking my butt!!!!! I would really like some help with it. I have to use a graphical user interface which I already built to display a binary file. The binary file is shown based on a BST, a …

Member Avatar for Lerner
0
81
Member Avatar for nelledawg

Ok so here is the code I've written already, as well as the errors I get when I try to build. Please help me figure out what the problem is! [code=c] #include <stdio.h> #include <stdlib.h> #include <ctype.h> #include <string.h> #define COMPANY "Rocklin Realty" #define TRUE 1 #define TAB 25 void …

Member Avatar for jephthah
1
263
Member Avatar for rraj.be

I am a beginner programmer an i started a project to build a mp3 player of my own. This is my first project in big level. Any kind of guidance or help will be greatly useful to me. If any one have some idea's please help me.

Member Avatar for marco93
0
295
Member Avatar for neknek

I have problems with searching & sorting strings in a file... I want to alphabetize the string so I did this [CODE]{for(x=0; x<100; x++) { for(c=x; c<15; c++) fscanf(stdin, "%s", student[c]->surname); if(strcmp(student[c]->surname,student[c+1]->surname)<0) {strcpy(temp,student[c]->surname); strcpy(student[c]->surname,student[c+1]->surname); strcpy(student[c+1]->surname,temp); strcpy(temp,student[c]->name); strcpy(student[c]->name,student[c+1]->name); strcpy(student[c+1]->name,temp); strcpy(temp,student[c]->number); strcpy(student[c]->number,student[c+1]->number); strcpy(student[c+1]->number,temp);} } }[/CODE] when i run the program, it just …

Member Avatar for ssharish2005
0
109
Member Avatar for Vao

[code=C]#include <stdio.h> #include <stdlib.h> void showBoard(int pLife[],int pType[]) {// WORKS NO-TOUCHY! int i; printf("\n*-----------------------------------*\n"); printf("| | | | | | |\n"); for(i=0;i<=5;i++) {printf("| %d-%d ",pLife[i],pType[i]);} printf("|\n"); printf("| | | | | | |\n"); printf("|-----+-----+-----+-----+-----+-----|\n"); printf("| | | | | | |\n"); for(i=6;i<=11;i++) {printf("| %d-%d ",pLife[i],pType[i]);} printf("|\n"); printf("| | | | …

Member Avatar for ssharish2005
0
153
Member Avatar for fishwater00

First of all, I need to thank all friends helping me here. Those days I learn a lot from your advices. The basic idea of my code is to read velocity file into domain[i].velocity[k]. Start!!! If I have a struct [code=c] typedef struct {int nx, ny, nz; float *velocity, *pwave, …

Member Avatar for fishwater00
0
155
Member Avatar for champnim

[code] struct fifo { int result; char *info; struct fifo *next; }*node; void add(struct fifo **n,int data,char *text) { struct fifo *temp,*node1; if (*n==NULL) { temp=(struct fifo *)malloc(sizeof(struct fifo)); printf("%d is to be stored\n",data); temp->result=data; printf("%d is stored\n",temp->result); temp->info=(char *)malloc(strlen(text)+1); strcpy(temp->info,text); temp->next=NULL; *n=temp; } else { temp=*n; while(temp->next!=NULL) temp=temp->next; node1=(struct …

Member Avatar for champnim
0
651
Member Avatar for cam875

Ok, I have a MySQL server 5.1 community edition setup on my computer, and I have SQL/ODBC connector 5.1 installed. Now I want to take my C++ console app and be able to connect to my sql server. Yes I have looked through many tutorials and source code and I …

Member Avatar for cam875
0
196
Member Avatar for longhorn75

Hi, I am new and don't know much about this program language, I had a programmer write a program for me from getacoder..com, anyways I need some editing on the program and I think he wrote it using C#. I only have a .exe file. Can another programmer open and …

Member Avatar for Ramy Mahrous
0
107
Member Avatar for maaply

Hi everybody, I have interview on next week. I know some question will come from link list. What kind of question will come in face-to-face interview's?. If some one post that kind of question, that will be very helpful to me. In this interview Question will be in C only. …

Member Avatar for Jishnu
0
65
Member Avatar for Clockowl
Member Avatar for champnim

I have made a singly linked list that holds an integer & a string. The creation of the list works fine but deletion of a node is giving an error. Previously I was not adding a string to my list(only adding int)& at that time the code was working. please …

Member Avatar for LouPascalou
0
141
Member Avatar for marcusbarnet

Hi to all! Is there a way to go and read a particular line in a text file? For example, i have a text file like this: 15 nick 25 marcus 18 sarah where each line contains an integer (age) and a string (a name). I'd like to write a …

Member Avatar for marcusbarnet
0
981
Member Avatar for fishwater00

Question 1: [code=c] typedef struct { int x, y, z ; float *wave; float *velocity; }Model; void a(Model *domain); void b(Model *domain, int t); int main() {int i; int j=10; Model Domain; Domain=(Model *)malloc(sizeof(Model); for (i=0; i<10; i++) a(domain); return; } [/code] if I block "Domain=(Model *)malloc(sizeof(Model)", the compiler doesnt …

Member Avatar for fishwater00
0
258
Member Avatar for manojkumar2004

Hi all, I was trying to post some data to a web server(tomcat) where my servlet is running. I have written a c# http client, I was able to establish the connection with the servlet but control is always going to GET method instead of POST method . Can you …

0
72
Member Avatar for nishanthaMe

Hi all I am developing a simple socket application which fetch a given URL from the web and save it in the local hard drive. But my internet connection goes through a proxy and I would like to know that what is the connecting URL and the port for my …

Member Avatar for jephthah
0
63
Member Avatar for scream2ice

hi, does anyone know if there is a code in c++ that allows print on paper instead of monitor? i mean instread of using [B]'cout<<'[/B] to see what you want on monitor, use a code to print your info on paper.......cheers

Member Avatar for Duoas
0
1K
Member Avatar for Dionysus
Member Avatar for michinobu_zoned

OKay, this is in response to the same issues I've been dealing with in another thread. In that one, someone gave me the documentation to the the POSIX calls, but they were vague and weren't too descriptive. I don't know what exactly each one of the calls do. I only …

Member Avatar for Duoas
0
105
Member Avatar for inventer

Hi! I am new to C programming, so this question might sound foolish. I have a problem with output of a program (sometimes the output is wrong) Following is the program: (I am using Turbo C compiler) /* Calculate simple interest */ #include <stdio.h> main() { int p, n; float …

Member Avatar for ssharish2005
0
245
Member Avatar for chandra1186

Hello i am new to c language i am unable to understand Functions in so any one help me to understand that topic. Thank you in advance.

Member Avatar for ssharish2005
0
246
Member Avatar for barbiegirl

hi everyone, i was writing an application, with the c language, which asks the user to give the number of strings to sort, and then sort'em, but i had some problems that i can't figure out, would u please help me [CODE]#include<stdio.h> #include<stdlib.h> #include<string.h> void getting(char *words[], int num); void …

Member Avatar for barbiegirl
0
115

The End.