15,550 Topics

Member Avatar for
Member Avatar for dbuckle

Hey guys, I'm just trying to get to grasp with structs and I have written a small test program to print out a persons name and age. Currently I am getting nothing when the program runs. Help :( [CODE]#include <stdio.h> struct person { char *name; int age; }; struct person …

Member Avatar for gerard4143
0
99
Member Avatar for minhviet93

I wonder what this problem is :error C2664: 'mine' : cannot convert parameter 1 from 'int [100][100]' to 'int' 1> There is no context in which this conversion is possible Here is my full program. [CODE]#include <stdio.h> int mine(int ,int,int); int main() { int m,n; int i,j; int u,v; int …

Member Avatar for WaltP
0
220
Member Avatar for rchris2121

[CODE]#include <stdio.h> #include <ctype.h> int isPalindrome( char *str, int length ) { if ( length < 1 ) { return 1; /* no more chars to compare, its a palindrome */ } if ( str[0] == str[length-1] ) /* Are the two ends same? */ { return isPalindrome( str+1, length-2 …

Member Avatar for WaltP
0
163
Member Avatar for korobaton

SO YEH MY problem is its not reading the whole file and inputing it to the stucture.. i believe that the problem lies in the adt.( the last source code on the bottom) in the private adt search function, insert function, and traversal..... ive been wreking my brains out trying …

0
155
Member Avatar for ezekit

SO im trying to get this source code transformed to a double link list it has two nodes sentinel and header....the source code was used to be a singly linked list..... nyhow i cant seeem to get this whole thing right..... it works fine when it was on its orginal …

0
94
Member Avatar for sunn shine

i hv 2 write a code for queue fifo rule for patients visiting doctor's clinic.. can any1 atleast tel me the algo? i'll implement it by myself...

Member Avatar for WaltP
0
112
Member Avatar for theofilos93

In a language named vJass I can do this: [CODE] function Initialization takes nothing returns nothing string array s call read(s[1]) call read(s[2]) call print(s[1] + " " + s[2]) endfunction[/CODE] It takes two strings from user and prints them. I am totally confused how I can do this in …

Member Avatar for hkdani
0
283
Member Avatar for vedro-compota

hi there) guys , please tell me - is there any way to check that the standart input is empty or no. big thanks in advance)

Member Avatar for hkdani
0
6K
Member Avatar for avani20391

Hello Friends, I want to create a User Defined Function with n number of arguments in C. for example, " printf() " in C. we can pass as many number of arguments as we want in printf() seprated by comas(,). I don't know how to pass argument in my UDF …

Member Avatar for gerard4143
0
185
Member Avatar for Aman6o

Came across this showbits() function in the book im using to learn C. None of the compilers recognize it. The actual code for the function is given in the book as well. I tried to combine the two by putting function's code in header file. I have been unsucessful so …

Member Avatar for cse.avinash
0
1K
Member Avatar for minimi

I'm trying to call two methods from main but I'm not sure how to do it. I know the program isn't completed but I want to get this done first so I can test whether it's working correctly. Could anyone help me out? [CODE] #include <stdio.h> #include <stdlib.h> void print_triangle_info(int …

Member Avatar for D33wakar
0
151
Member Avatar for challarao

I wrote this program for insertion sort.I compiled the source file in xubuntu terminal.But when I try to run a.out executable....terminal showing "segmentation fault".I don't about segmentation fault..when segmentation fault occurs...what is the thing in the source file that is causing segmentation fault... Thanks in advance...... [CODE]#include<stdio.h> main(){ int i,j,n,key; …

Member Avatar for challarao
0
368
Member Avatar for nered

Hi, I am writing a small console app. To get right to the point my application comes with quite some data about 1mb of text files. Instead of compiling the software in to a exe and shipping it out whit all the text files is it possible to include these …

Member Avatar for thines01
0
146
Member Avatar for bonyjohn

I am a Btech Computer Science students, Guyz please give me some project ideas for my main project..i have one idea in mind it's a garbage collector in c..it's an old idea i want to add new features...plz help....

Member Avatar for carljohn
0
227
Member Avatar for rutwvu

I am currently working on a project where we must read in a file and then print it back type justified. There must also be a specific number of characters per line based upon user Input with the extra characters being distributed spaces. I am reading in each character from …

Member Avatar for Ancient Dragon
0
178
Member Avatar for avani20391

Hello Friends... I'm writing a C program to print pattern of swastik using *. I want to set my pattern in the center of the screen. Can anyone tell me how can I do this ???? Below is the C program for swastik, but it do not print swastik in …

Member Avatar for avani20391
0
865
Member Avatar for Se7Olutionyg

I am trying to write the string to text file after heap sort.... it works correctly, just don't know why there's some weird charracter in the output file.. Any help with be appreciated. Content of input file in1 is abc efg ghi q w Thanks [CODE]#include <stdio.h> #include <ctype.h> #include …

Member Avatar for Smeagel13
0
188
Member Avatar for fishman6

Hey, I've been trying to get this to work for most of the day. Basically I have an array of strings and I'm adding to them using strcat in a loop. It works fine for the first few loops but then the strings start to go all out of whack. …

Member Avatar for Narue
0
163
Member Avatar for techyworld

i need to modify the following code so that the parent thread can pass to the created thread a number (from 1 to 10) and the child thread should display that number of values. The number passed to each created thread can be a different one. Note: In this case …

Member Avatar for gerard4143
0
125
Member Avatar for MrNo

Hey guys, I'm having a little trouble putting this together. I believe I have the formula correct on the bottom, but I can't seem get the program to work. The idea is that it needs to be able to run like this: ./sdev < input.file I have a simple understanding …

Member Avatar for D33wakar
0
1K
Member Avatar for Alex Starkov

Hi! I have to write the programm, which will receive any number (at sec) and calculate it to weeks, days, hours, minutes and sec; for e.x. 4102 sec ---> 1h 8m and 22s The problem is that it's forbidden to use atoi(), scanf() and simmilar functions. Insead of them, I …

Member Avatar for Alex Starkov
0
250
Member Avatar for Caleb_83

It's a little more complicated than that, but this is my code: private void button1_Click(object sender, EventArgs e) { Decimal num1 = Convert.ToDecimal(textBox1.Text); Decimal num2 = Convert.ToDecimal(textBox2.Text); Decimal total = num1 + num2; textBox3.Text = total.ToString("C"); Decimal total2 = Convert.ToDecimal(total); total2 = total * 4.2; textBox4.Text = Convert.ToString(total2); Basically it's …

0
49
Member Avatar for axa121

Hi I've been trying to code a bst based upon this link below: [url]http://www.stanford.edu/~blp/avl/libavl.html/BST_operations.c.txt[/url] I've adopted a similar strategy, whilst making some modifications, however for me I'm having a problem in that every time I go to add a new node to the bst, the root is always null, and …

Member Avatar for axa121
0
189
Member Avatar for aero31aero

I have a file of name PROFILES.DAT in which several records are stored. I want to create some new fields in those records so I made a new program to read the file, store records in a structure, copy the structure elements into a new structure and finally write the …

Member Avatar for aero31aero
0
239
Member Avatar for Aman6o

Here are 2 simple files I am unsucessfully trying to combine and make the .exe. The errors i get are: Multiple definition of '_fun1' and '_fun2'. I am using the Cygwin gcc compiler. Please advice, Thanks. [CODE]#include <stdio.h> #include "functions.c" int i = 35; int fun1(); int fun2(); int main() …

Member Avatar for Aman6o
0
206
Member Avatar for corby

i have this code for adding a node after the previous node, but valgrind is saying that there is a memory leak of 16 bytes, can someone please help me identify where the leak is? i think i didnt assign a null pointer somewhere but im not sure exactly where …

0
115
Member Avatar for kunal_m

I am working on a project called Payroll Management System... and am using C as the platform. The project will look to ADD..VIEW..DELETE..& EDIT employee details. All this will be done by the Administrator. I have been working on it a bit lately.. and i know before i seek help.. …

Member Avatar for Smeagel13
0
143
Member Avatar for Panathinaikos22

Hello, i know that * is a pointer, also i know for ** is a pointer to a pointer... i can understand that [code] int *x; int y; x=&y; [/code] but last days i see something like this, and is a little hard to me to understand it. [code] void …

Member Avatar for Panathinaikos22
0
120
Member Avatar for Se7Olutionyg

I am writing code to open file and read info from that file to open other files, dont' know why it's only open the first file, not file after that THanks [CODE] /* strtok example */ #include <stdio.h> #include <string.h> #include <iostream> using namespace std; void remove ( char str[] …

Member Avatar for Narue
0
171
Member Avatar for Se7Olutionyg

I am writing a code to read file and output stuff for two files and combine them together... Don't know why they read good at the first file but wit the same code , it didn't show up for the second file Please help Thanks [CODE]#include <stdio.h> #include <string.h> #include …

Member Avatar for Narue
0
402

The End.