19,876 Topics

Member Avatar for
Member Avatar for Dewey1040

ok this code gets three sides of a triangle and prints out the area... but it just prints out that the area is 0 every time... why? [code=C] #include <stdio.h> #include <math.h> double area(int a, int b, int c); int main(int argc, char *argv[]){ int a, b, c; printf("\nSide A: …

Member Avatar for uskok
0
118
Member Avatar for Carrots

Hi! I was hoping for some advice on how best to create a single doubly-linked list which could contain all of the different types of classes I have. This is the code I have written so far.... [B]shape.h:[/B] [code=C++] class Shape { public: Shape (int l=0, int h=0) : length(l), …

Member Avatar for Intrade
0
126
Member Avatar for vartikachandra

i have made the following code... but i am having problems in accessing it.. [code] //structure for queue struct queue{ int items[MAX]; int front; int rear; }; //decleration of the queues :que_term for the values printed on the terminal struct queue que_mul2,que_mul3,que_mul5,que_sort,que_write,que_term; //initializing the queue void InitQueue(queue &q) { q.front=0; …

Member Avatar for vartikachandra
0
305
Member Avatar for PRATS 1990
Member Avatar for phalgun_g

hello everyone.. I have been given an assignment to do a mini project in my college using C.As such im in dire need of ideas for the same. I need ideas for programming games,innovative programs etc.. till date they have taught us C pointers structures & arrays.. So ill have …

Member Avatar for MosaicFuneral
0
161
Member Avatar for sanctuary

Can you give an example of how I could implement a C functional #define statement in C#? I have one with 3 lines of code, delimited using \ at the end of each line.... could you explain how this works when executed in C? Thanks

Member Avatar for Ancient Dragon
0
90
Member Avatar for snap!

ok so i am going to be taking a c++ course next semester and was wanted to get better knowledge so i have a proble that i was givin that am having some trouble, just some pointers on where/how to start will be helpful... Im not sure how to set …

Member Avatar for rahul8590
0
94
Member Avatar for Valaraukar

Hi, I am basically writing a program that reads in ASCII files exported from 3ds max in order to reproduce an object in OpenGL. My code works fine for one object and I've even got it working for two as long as the second object contains less vertices/facet windings than …

Member Avatar for nucleon
0
195
Member Avatar for massivefermion

Hi I just finished reading C++ the complete reference by herb schildt (almost a quarter ago)so i feel i can program in c++ but i don't know what to write.could you give me some problems that their answers involve a lot of c++ features? thanks a lot

Member Avatar for ithelp
0
147
Member Avatar for shea279

does anyone have a function laying around to secure delete a file from the hard disc with X passes of random data? ive been trying to find this code forever on google, and everything I have found has just been skimpy .NET programs

Member Avatar for ArkM
0
691
Member Avatar for littlespy

Hi all, I'm working on a programming assignment for class and after trying a few things on my own I got stuck. Basically my function will take a string and count the number of times each word in the string occurs in the string. For example this string: The brown …

Member Avatar for nucleon
0
100
Member Avatar for Alibeg

i need something from standard libraries that can help me outputting chars at specific places on my screen...i have seen some commands defined in conio.h but i cannot use it as my compiler doesnt have it and it is not standard and not portable any other libraries or suggestions?

Member Avatar for kenji
0
80
Member Avatar for jspeakers

Hi there, Can any one help me, I am trying to import a wave audio file apparently I have to remove the header file or something like this can any one advised me please.

Member Avatar for jspeakers
0
83
Member Avatar for arka_15
Member Avatar for Alibeg
0
68
Member Avatar for madhatter84gn

I am running into an issue that involves sharing an XSD2Code generated class. I am working with one huge xml schema that I generated into a class in a common class library. The problem I am facing is multiple applications will be referencing this common class but I want to …

Member Avatar for madhatter84gn
0
95
Member Avatar for xcruiser

I have an assignment to submit tomorrow. It gives me compiling errors. About 62 in VC++ 2008 and 42 in VC++ 6. I have written this code in one single file and it works fine there. One error that I can think of is with the declaration of class variable …

Member Avatar for seanhunt
0
1K
Member Avatar for StillCrazy

Hi everyone. I am new to this web site. Found it while doing some research. My need is as follows: I am modifying a healthcare Practice Management System for a company in Jacksonville, Fl. and the client wants to be able to create basic BAR and PIE charts. There is …

Member Avatar for Ancient Dragon
0
98
Member Avatar for PRATS 1990

I HAVE A VERY PECULIAR PROBLEM,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, THE PROGRAMS I COMPILE SHUT DOWN AFTER COMPILING ONCE,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, FOR EG- I CREATED THIS PROGRAM FOR GETTING THE ASCII CODES OF AN ALPHABET ,,,,,,,,,,,,,,,,,, AFTER I WROTE THE ALPHABET IN DOS IT DISPLAYED ITS VALUE AND SHUTDOWN,,,,,,,,,,,,,,,, HOW CAN I ALTER MY PROGRAM TO …

Member Avatar for PRATS 1990
0
228
Member Avatar for Dewey1040

Multiplying the digits of an integer and continuing the process gives the surprising result that the sequence of products always arrives at a single digit number. For example, 715 ---- 35 ---- 15 ---- 5 27 ---- 14 ---- 4 4000 ---- 0 9 The number of times products need …

Member Avatar for Dewey1040
0
2K
Member Avatar for kuru225

Hello All I am having some problems with a C++ class that i am taking and after looking around on the web I am still lost. The assignment that I am working on right now is as follows: [ICODE]Two numbers are entered in from the keyboard. If the larger number …

Member Avatar for kuru225
0
170
Member Avatar for sankari27

Hello. My program gets "segmentation fault" in "strcat(string,stringaux)" and it is strange because I am sure that string always has space for adding the new stringaux due to before call strcat I check if size of the destiny plus new stringaux is less than string capacity: [code=c] char string[100]; char …

Member Avatar for Ancient Dragon
0
68
Member Avatar for littlespy

Hi all, Just registered on the forum. I have a quick (hopefully) question. I'm trying to read from a text file into one single string. I'm having some trouble though and can't quite find my error. I have the following code below right now. The problem is that my function …

Member Avatar for Aia
0
160
Member Avatar for dv1r

is there a way to increase bluetooth range in mobile phone for 1 seconed? by changing the driver or somthing like that? in C\asm? i asked in the java forum,they said it might be possible in C. to save time - i checked and it's possible to increase range of …

Member Avatar for EricIskhakov
0
105
Member Avatar for mizzwaniez

How to do this assigment.im did not understand it..plz somebody help me.i will appriciate anybody who will help me. The program question are like this and this program should use c programming:- The owner of a snack bar wants a system which will allow a menu, with prices, to be …

Member Avatar for moonw3ll
0
91
Member Avatar for CoolAtt

hi everyone. my program uses an infinite loop & runs forever. i want to run some codes when i decide to stop the program using CTRL-C. Is this possible ? Please advise me. thanks

Member Avatar for CoolAtt
0
255
Member Avatar for gseed87

Project Title : Student Grading System Purpose : Calculate the grade and sort the student matrix in descending example Input file : studentsmark.txt example Output file: studentresult.txt How the user operate the software: 1) user run the software 2) an interface show on the screen 3) user keyin Input file …

Member Avatar for r.stiltskin
0
193
Member Avatar for Azurkan

So A friend and I are new to C++ and we are trying to create a sudoku project and are trying to figure out different ways to do so. Right now we are stuck at the repetition checking. I was wondering if anyone could help us out?? We are trying …

Member Avatar for nucleon
0
100
Member Avatar for jimjohnson123

I am at work and did this program on notepad and not sure if this is correct or not. Can someone that has the visual studio compiler test this and let me know if it works. If it does no could you offer any minor feedback on the location of …

Member Avatar for nucleon
0
151
Member Avatar for Hiroshe

I'm trying to solve [URL="http://code.google.com/codejam/contest/dashboard?c=agdjb2RlamFtcg4LEghjb250ZXN0cxh5DA"]this[/URL] problem. The input file I used was the one on the site: [CODE]4 9 0123456789 oF8 Foo oF8 0123456789 13 0123456789abcdef 01 CODE O!CDE? A?JM!.[/CODE] My abstract idea was: Read the first line, loop the program that many times. Read the next line. Load the …

Member Avatar for Hiroshe
0
216
Member Avatar for nito28

For this assignment you will write a wrapper routine for the LAPACK routine DGESV to solve the system of equations Ax=b (where A is a num by num matrix, and x and b are vectors of length num). A wrapper is a routine that reformats (or supplements) it's arguements in …

Member Avatar for StuXYZ
0
134
Member Avatar for erialclaire_238

Need to write a simple declaration program w/c apply the substitution method. substitution table is: *-a $-e /-i +-o --u sample outputs ENCRYPTED MESSAGE: m$$t m$ *t 9:00*m /n th$ p*rk DECRYPTED MESSAGE should be: meet me at 9:00am in the park MY PROGRAM: [code=c] #include<stdio.h> main() { char c; …

Member Avatar for erialclaire_238
0
207
Member Avatar for PRATS 1990

Hey guys this is a very naive problem,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, but how do i save the c programs i compiled on borland c++ on the dekstop???????????????????????

Member Avatar for PRATS 1990
0
103
Member Avatar for Theateist

I can't understand why when I'm calculating the num of elements of 'A' in main(), so the result is correct. But when I pass the 'A' to function myfunc() and calaculating there so the result is incorrect. Can please someone explain me? [code=C] typedef struct { char description[30]; unsigned price; …

Member Avatar for Ancient Dragon
0
74
Member Avatar for kenji

Hey Guys, I need some help figuring something out for an assignment. The assignment is basically about creating a editing program to edit a single char string on the console, everything has been coded and works without a hitch except for one part. I can only display a certain number …

Member Avatar for John A
0
113
Member Avatar for jahkevin

three stand A,B,and C as a capacity of 20 each array should show 0 or seats occupied method should show capacity and state of each stand before accepting user input accept age,stand,and index as input output total amount collect by each stand,total classification of the patrans in each stands when …

Member Avatar for WaltP
0
73
Member Avatar for gamodg

I have a structure [code=c] struct Info { char *name; char **value; }; [/code] and a function [code=c] void addValue(struct Info *info,char *value ,int posVal) { int size=strlen(value)+1; info->value[posVal]= (char *)malloc(size); strcpy(info->value[posVal],value); info->value[posVal+1]=NULL; } Main struct Info info[10] ....... ....... initValArrSize(&info[0],1); /* Make size+1 single dimension arrays of size char …

Member Avatar for gamodg
0
107
Member Avatar for Dewey1040

Write a program that will compute and print out all positive integers that are less than and relatively prime to the integer 351. Two numbers are relatively prime if their greatest common divisor is 1. You must call a gcd function. so far i have this, it compiles and works …

Member Avatar for nucleon
0
87
Member Avatar for vinitt88

Hi, I am trying to develop a DOS-like system which will be able to do all minor functions like cd.. cd/ and changing to sub directories. Guys I am stuck in how to find a single path for many files..... Thanx in ADVANCE

Member Avatar for Ancient Dragon
0
146
Member Avatar for toucan

I want to able to search for multiple words on the same line. For example, consider the file with the following contents: .... 11. 15 18 40 53 => 16 19 41 54 12. 03 15 27 64 => 04 15 28 65 13. 25 46 47 91 => 26 …

Member Avatar for toucan
0
138
Member Avatar for wzseow

Hi there. I've written a program to sort a few numbers. However, I get an error missing function header. Can you please guide me where did it go wrong? Thanks [CODE]// #include "stdio.h" int sort(double top, double middle, double bottom); int main() { double x[20]; x[1]=0; x[2]=-0.07; x[3]=0.08; x[4]=-0.01; printf("%.1d,%.1d",x[1],x[2]); …

Member Avatar for wzseow
0
116
Member Avatar for Xeuron

i define a structure that contains a constant member. the problem is, when i use [icode]malloc[/icode] to make such a struct, i fail to initialize its const member, for example: [code] struct C { int* const p; }; int main() { int i = 0; struct C s = { …

Member Avatar for kenji
0
83
Member Avatar for death_oclock

Is there any way to force fwrite() to write in big-endian format no matter what? I am trying to write a MIDI file and they are always big-endian. Converting every value I write to big endian beforehand would be extremely tedious. Ideas?

Member Avatar for mcldev
0
853
Member Avatar for Alibeg

[code]int **p; p = malloc (x * sizeof *p);[/code] sizeof *p - (i am not quite sure, and i was thinking) does it calculate the size of *p as size of double pointer, size of pointer or as size of variable pointed by pointer another exmaple with same [icode]int **p;[/icode] …

Member Avatar for nucleon
0
102
Member Avatar for bahr_alhalak

hi every one i want C program to store 10 characters in alphabetical order using merge sort and quick sort? and another program to input 10 names ,maximom of 25 characters ,using merge sort and quick sort?

Member Avatar for nucleon
0
56
Member Avatar for jimjohnson123

Ok I am having an issue with a program. I am in C++ II but my issue is I have not taken C++ I in over a year so I am at a disadvantage...we are working on a program and this is the information we were given and this is …

Member Avatar for VernonDozier
0
131
Member Avatar for Alibeg

i have problem passing double pointer to my funciton first i declare: [icode]int m, n;[/icode] i read m and n from user just fine (i've checked that) then i declere: [icode]int farm[m][n];[/icode] and i have a function... [icode]void harvest(int **farm,...);[/icode] and when i call it with: [icode]harvest (farm,...);[/icode] it says …

Member Avatar for Narue
0
226
Member Avatar for agunning

I am trying to create a project, which will compute the yearly and monthly rate of taxes to be paid by a person earning a given gross yearly salary, knowing the rates for NI contributions, pension contributions, and income tax. The problem i am having is i dont think the …

Member Avatar for Narue
0
83
Member Avatar for localp

i want a way to do validations for a String (the text should contain only characters, and not _ @ or any number) .. i found a code that does validations for integers, but not for strings.. Please could u, send me the code to conduct validations for Strings,, i …

Member Avatar for ddanbe
0
83
Member Avatar for sanushks

Hi All, i'm executing a C program in unix, is there a way i would be able to capture abnormal termination of the C program. i observed that abnormal termintion results in the segmentation fault message being displayed. Would i be able to capture the return count in Unix to …

Member Avatar for kenji
0
176
Member Avatar for vijaypaigwar

The End.