19,876 Topics

Member Avatar for
Member Avatar for chorei

hey all i have a real problem with fibonacci numbers i have calculated max fib(47) with my codes but i have a project that i need to calculate the n'th fib number which is get from the user and print the fib valu to the screen the numbers must be …

Member Avatar for iamthwee
0
252
Member Avatar for #include_rose

I keep getting this warning every time I compile the following code. Can anyone please tell me what I am doing wrong. Also, the printf(head->data) keeps saying that printf's argument is invalid. How do I print head's data? Any help is appreciated. Thanks, [CODE]#include<stdio.h> #include<malloc.h> typedef struct { int data; …

Member Avatar for #include_rose
0
295
Member Avatar for zandiago

Good day folks. I have a simple question anout structs. Say for example i have the following: [CODE] struct foodmenu { char letter; string food; double cost; }; [/CODE] We just started a look at struct and it's really not too clear. So with regards to my example above...how does …

Member Avatar for zandiago
0
158
Member Avatar for Aarthi Gopal

i had a prob wen i had to sort each column of a matrix. the prob s wen i use larger values say 2453,23465 etc. the sorted matrix returned garbage values.. y s that? n how do i find factorial for 300 n bigger numbers?? i'm not able to store …

Member Avatar for Ptolemy
0
108
Member Avatar for FallenPaladin

Hi, I am currently studying programing, and have become some what stumped with Visual studio 2003. I have written a number of application using the console, however currently i am trying to clear of text that has already been written to the console.....but can not find any command or code …

Member Avatar for FallenPaladin
0
147
Member Avatar for Slate2006

For a class I am taking I need to produce 1000 random numbers and store them in an array. I am totally lost and need some help. If someone can get me started on the program it would help me. Also, i need to write a function to find the …

Member Avatar for Etniespr101
0
86
Member Avatar for n.aggel

hi, i want to begin socket programming and interprocess communication but i don't where to begin....can anyone suggest some sources?? thanks in advance, nicolas PS:: sorry if the question is vague, but it isn't easy to be more specific....

Member Avatar for stupido
0
191
Member Avatar for tphuynh

Hi, I don't under what I'm doing wrong. In my line of code I have 2 outputs: The first outout returns a value, however, when I try to output the second ConsoleLine I get a value of "0"?? I'm thinking it has something to do with Converting a string to …

Member Avatar for JerryShaw
0
165
Member Avatar for mqueene7

I'm struggling with my code and was looking for a tutor. Does anyone know of a tutor available? Thank you!!

Member Avatar for WaltP
0
84
Member Avatar for locy

How do i write a programm that the given text.the longer the text will factorized (in primenumber order).The text is for the following transformation as matrix with the Dimention [B]n[/B](breath;smaller Primefactor) multiply [B]m[/B](highest;bigger Primefactor).The letters of this matrix will in column by column displayed the output format is the transpose …

0
82
Member Avatar for turkgames

I made a program in C for my school work but i cant make it work.Piglatin means cutting the first character of a word and adding it to the end and finally adding an "a" to the end.For example teacher -> eacherta. Can you help me finding the problem? [code=c]/***************************************************************************************/ …

Member Avatar for WaltP
0
101
Member Avatar for mank

I want to pass a float array from one function to another function I want to make use of the float array type(here container) [CODE]void funct1() { float container[4]={0.1,0.2,0.3,0.4} void funct2() ----(1) {return container;} } void funct3() { void funct2(); use container array; }[/CODE] Here what would be the funct2() …

Member Avatar for mank
1
2K
Member Avatar for majestic0110

Hi all, Just wondering if you could help me out here. bought a copy of c++ for dummies today and the first program in the book converts fahrenheit to celsius. Now I have some C and Java experience (I am a recent graduate of a software design degree) but have …

Member Avatar for iamthwee
0
208
Member Avatar for hotice187

hi I use Turbo C compiler in my school (Gujarat, India) Our course based on book E.balagurusamy there is no description of array like this int a[3,2] can ne 1 plz tell me how it is different from normal 1d array ? n how d values r stored in that …

Member Avatar for Salem
0
105
Member Avatar for cwtliew

Hello! I'm practising 2d-arrays for my upcoming test so pls help! i cant figure out what went wrong :((((( Q: A factory has 3 divisions and stocks 4 products. An inventory data is updated for each division and for each product as they are received. The current inventory data is …

Member Avatar for cwtliew
0
95
Member Avatar for zandiago

Good day. My infile contains the following: [CODE] TFFTFFTFFTFFTFTFTFTFFF A33 TFFTFFTFFFFFTFTFTFFFFT Z27 TFFTFFTFFTFFTFTFTFTFFT X12 TFTT FTFFTFFFT FTFTFFF H44 TFFTFFTFFTFFFFTFTFFTFF Q19 FFFFFFFFFFFFTFTFTFFFFF D72 TFFTFFTFFTFF FFFFFTFFF W32 FFFTFFTFFTFFTFTFTFFTTT Y09 TFFTFFTFFTFFTFFTTFFTTT S44 TFFTFFTFFTFFTFTFTFTFFF G11 FFTFFTFFTFFTFTFTTFTFFF J21 TFFTFFFFFTFFTFTFTFTFTT K61 TFFTFFTFFTFFTFTFTFTFT M03 TFFTFFTFFFFFTFTFTFTFFT P24 TFFTFFTFFTFFTFTFTFFFFT N54 FTFFTFFTFT TFF FTFTFFF F33 TFFTFFTFFTFFTFTFTFTFFF Z21 TFFTFFFTTFTTFFTFTFTFTF V39 TFFFTTFTTFTTFTFTFTTFFF …

Member Avatar for zandiago
0
3K
Member Avatar for the.alchemist

Hello. Here's my structure: [code=C] struct settings { char setting[40][255]; }; [/code] Here's the function that is supposed to take a pointer to an instance of the above structure and modify it : [code=C] void changeSetting(struct settings *tempSettings, char *newValue, int indexValue) { if( indexValue<40){ // to avoid out of …

Member Avatar for Salem
1
116
Member Avatar for donaldunca

I have small question: How can I create a random string from 'a' to 'z'? thank you!

Member Avatar for donaldunca
0
163
Member Avatar for jammy's

Hello can some one say how to use tracing in turbo c and to show the trace like we do manully is their any function how do watch options work plz say me i am a student and beginner in c guys help me experts professional and any one plz

Member Avatar for Fast
0
98
Member Avatar for appuguy

Hi could you please tell me how to print array elements with spaces. Please provide an example. I would like to see how a 2 D array is printed.Thanks a lot

Member Avatar for Aia
0
114
Member Avatar for crunchycrisp

For an assignment that im working on, we needed to accomplish the following: Asks the user for their name, accepts and stores the answer as a string. Opens a text file: questions.txt for reading �Opens a text file: studentName.ans for writing, where studentName is the one entered Reads each line …

Member Avatar for Aia
1
154
Member Avatar for theteamdrunk

I am trying to write a program that has to create a structure that has one variable called value and one pointer to the list(making it a linked list). It need to prompt the user for 5 values and store them into the linked list, then print out the list. …

Member Avatar for Duoas
0
102
Member Avatar for sarwar

Hi, I am seeking your help on following pthread_create issue on linux OS. The senario is I have a main program which generates new child threads on user request.The new child executes a module and closes. It is working perfectly if there are less then 245 new threads after that …

Member Avatar for Salem
0
178
Member Avatar for appuguy

Sample Input:o 0 4 0 5 0 8 0 7 0 Press any key to continue . . . This is what I have so far for the code [ [code=c] #include <stdio.h> #include <stdlib.h> #define ARRAY_SIZE 81 int nArray[ARRAY_SIZE]; /*Function prototypes */ void PopulateArray( int nArray[9][9]); void PrintArray(const int …

Member Avatar for WaltP
0
255
Member Avatar for Barefootsanders

Hey everyone, I'm using Dev-C++ to compile the following program. It's simple but for some reason its not working. [CODE] #include <stdio.h> #include <unistd.h> int main() { int n, fd[2], pid; const int MAXLINE = 4096; char line[MAXLINE]; if(pipe(fd) < 0) { printf("Pipe error"); } if((pid = port()) < 0) …

Member Avatar for Duoas
0
321
Member Avatar for theteamdrunk

I need to add prompts for the number, integer and character inputs separatly instead of all at once. I want it to say "enter a number" wait for input, "enter an integer" wait for input and "enter a character" wait for input. Then it is suppose to combine the inputs …

Member Avatar for Duoas
0
122
Member Avatar for appuguy

Hello I need help with a C program that I solves Sudoku puzzle. I am suppose to write two functions one to populate the arrays from the user input. This function should take as parameters the arrays to fill.Second function to print the 9 by9 array passed to it.This function …

Member Avatar for Ancient Dragon
0
108
Member Avatar for CornPoper
Member Avatar for munyu

Hello guys help me with a code that hides a document say for example in my documents you can email at <snipped> if you get the code or anything about c++

Member Avatar for Ancient Dragon
0
97
Member Avatar for jigart4586

hi, i a m jigar thakkar please help me. int a=1; printf("%d%d%d",a++,a++,a++); output : 3,2,1 how work this in c? please explain in detail? Thanx in advance.

Member Avatar for Ancient Dragon
0
110
Member Avatar for Badong Ang Lim

Hello I'm new here, I try this site when I found the url in the web when I am trying to solve my problem. And I became interested and join. Hope you can help me with this one: I have this program: #include <stdio.h> main() { char input; int base,a,b,c,d,e; …

Member Avatar for Badong Ang Lim
0
442
Member Avatar for arkane

Hello to the forum, perhaps someone can help me. I am trying to read a file that has the following format: 128 byte header float data When reading the header, I need to extract the following from the header: bytes0-6= short unsigned int big endian byte7 = int bytes8-23= float …

Member Avatar for arkane
0
149
Member Avatar for MedianHansen

Lately i've been having some problems, importing an SDL library, into my compiler, and as a result of that i have chosen to change to a new compiler. I have followed 3 differend online tutorials, re-installed the compiler three times, and done it with three different downloads of the SDL …

Member Avatar for people123
0
326
Member Avatar for warpstar

First of all I would like to say that I am a super newb at C, and would appreciate any help possible. I have to read a text file of words and sort them in lexicographical order (alpha order), I tried using the bubble sort and got this error on …

Member Avatar for Salem
0
486
Member Avatar for sohanonline

hello..... i just had a problem with file management in c programming.my friend gave problem but i dont know how to see the output.is there any file which i have to create first and see the answer?please help me.thanks.:)

Member Avatar for iamthwee
0
114
Member Avatar for santhiks

i am new to c++ graphics.can anyone suggest a book name to study graphics for a beginner

Member Avatar for Xavier2k
0
79
Member Avatar for mt171406

[INLINECODE]I am trying to develop a program that reads a list of integers from a file and outputs whether or not each integer in the file is perfect. Its suppose to give practice using endfile-controlled and for loops. The input file of numbers i have created are : 456 18 …

Member Avatar for Aia
0
91
Member Avatar for c++beginnerer

Hi, im at the end of my tether after spending hours trying to find a solution to this so hopefully somebody here can help me out. I have a structure, customer, which contains just a few details such as name address phone number etc. I need to store this info …

Member Avatar for Lerner
0
95
Member Avatar for zayalaksme

please any one send a program to "[B]addition and subtraction of two SIGNED BINARY NUMBERS by using 2'S COMPLEMENT[/B]" it is urgent

Member Avatar for Salem
0
70
Member Avatar for vinaychalluru

Hi,every one.I am new to C language and there I had tried a program as here and I got an output from what I had expected and hope you will help in this aspect and I have given the program as an attachment for better viewing of it. thank you …

Member Avatar for Ptolemy
0
125
Member Avatar for mank

I am trying to convert some data that I read in file as string data to a float array The data that is read are in two dimensional string array like [CODE]char tmatrix[10][100]; for(j=0;j<k3;j++){printf("\n %s",tmatrix[j]);} //k3=max data read 0.5 0.2 0.3 0.6[/CODE] Now I need to convert the content of …

Member Avatar for Salem
0
119
Member Avatar for profess69

Hello anyone if you see this please reply fast: i need some major help with some programming and logic code through liberty basic, My project consist of making an ATM Program allowing the user to only enter the security code 3 times and it also prompts you to enter a …

Member Avatar for Ancient Dragon
0
335
Member Avatar for mt171406

[INLINECODE] I am having a problem trying to write a program that gets numbers from a selected file and returns each numbers sum of its perfect divisors. Could anyone give me a few pointers??[/INLINECODE] [CODE]#include <stdio.h> /* define fopen,fclose,fscanf,fprintf, EOF */ int sum_of_divisors(int num); /* pre: Accepts the integer */ …

Member Avatar for mt171406
0
345
Member Avatar for rocksteady911

Hi everyone, I was browsing through the forum to find some code for a palindrome program. I get some parts of it, but I'm confused what a certain while loop does. Can anyone help clarify? [code] char s[256],t[256]; /*char array of length 256*/ char *p,*q,*r; /*define char array*/ int i=0,j=0; …

Member Avatar for Aia
0
120
Member Avatar for fcleme

I am trying to relearn C by going through the K&R exercises (I have the first, non-ANSI, edition...that's how long it's been since I last programmed in C under Unix as a software engineer). I have Visual C++.net version 2003 on a Windos XP computer. I would prefer to continue …

Member Avatar for Ancient Dragon
0
137
Member Avatar for susuoi

I'm doing image processing. To make the computation faster, I found fork command. With fork command, I can make the computations run parallelI. The problem is the result only exists inside child process. int main(int argc, char **argv){ int n, num, pid; double hist[num][n]; for(i=0; i<num; i++){ if((pid = fork()) …

Member Avatar for Salem
0
82
Member Avatar for Ptolemy

>I disagree. You have to have all kinds of special code to get scanf() to work properly. Only if you aren't using scanf for what it was designed in the first place. When you have to write workaround code to get a function to work, you're using the wrong tool …

Member Avatar for Dave Sinkula
0
414
Member Avatar for zandiago

So far this is what I have: [CODE] #include <iomanip> #include <cmath> #include <fstream> #include<string> #include<iostream> using namespace std; int main() { ifstream infile; ofstream outfile; infile.open ("Wordcalc.txt"); outfile.open ("WOutput"); char A = (1*2.0);//value for letter A char C = (3 - 20.4); char D = ((4/12.0) *3.09); char E …

Member Avatar for Ancient Dragon
0
501
Member Avatar for jobi.tv

hi friends, I don't have c++ software. plz give me the c++ s/f and tell me the link........

Member Avatar for WaltP
0
93
Member Avatar for megan-smith

hey! I'm working on a program that part of it asks for an integer input. then if the value entered is not an integer, it should print an error message. If not, then the rest of program (which I've got partly complete). But, I have no idea how to distinguish …

Member Avatar for WaltP
0
586

The End.