19,876 Topics

Member Avatar for
Member Avatar for vileoxidation

I am working on a program in C right now that deals with linked lists. Here is the assignment statement: [INDENT]"Write a C program called Assignment4.c, that creates a linked list of Customer data. Each entry in the list is to have the customer’s last name, first name, id (int), …

Member Avatar for vileoxidation
0
286
Member Avatar for globalizard

This is not a homework problem & my first post in 2+ years. I just got asked to do this in C# based on my asp & DB experience & I am tearing my hair out as they want in done in one day & 2 MS videos say to …

Member Avatar for sknake
0
207
Member Avatar for van_tomiko

Anyone got anything about reading a sequential number from text file per line and parsing it to an array in C? SequentialNumber.txt 12 3 45 6 7 8 3 5 6 7 7 0 -1 4 5 array1[] = {12, 3, 45, 6, 7, 8}; array2[] = {3, 5, 6, …

Member Avatar for yellowSnow
0
129
Member Avatar for spdr2006

Could you check this C language Code... The Output is not complete... it doesnt print the firstclas name n id? my assignment is Write a complete C program that will meet the following requirement: • Create student detail must contain each student’s name (as a string), id (as integer) and …

Member Avatar for yellowSnow
0
329
Member Avatar for Ineedhelpplz

This is the error I have been receiving when trying to compile my code: [QUOTE]blade71(45)% gcc -o trim trim.c Undefined first referenced symbol in file getline /var/tmp//ccYdyoM3.o ld: fatal: Symbol referencing errors. No output written to a.out collect2: ld returned 1 exit status [/QUOTE] My source is only a rough …

Member Avatar for Ineedhelpplz
0
988
Member Avatar for edwar

is there anyone who knows how to remove numbers and coma's from a text file

Member Avatar for gerard4143
0
105
Member Avatar for Enigmo

Hello. Please, say, how can I obtain a contact's Birthdate? The standart export from Addres Book does not export it. If I'm writing a code,(using that from [URL="http://www.daniweb.com/forums/post996454.html"]http://www.daniweb.com/forums/post996454.html[/URL] ) there is a property PR_BIRTHDATE. How do I convert it to the text string and write anywhere, like Edit3.Text = lpProp->Value.(something …

0
88
Member Avatar for ankit894u

[ATTACH]11812[/ATTACH] hey guys can some one pls show me a away to how rite this program...i have made as many attempts as i could...i m not lazy its just tht i donot knw wht to do....i just want to knw how to compute the formula...i knw the other steps...so if …

Member Avatar for ankit894u
0
86
Member Avatar for coolice

Hi ! Could somebody help me how can I import email addresses from Windows Address Bok (wab) file programatically ? The simplest code would be the best one, as I was able to found several but far too hard code to understand the hole issue. Many many thanks for anybody …

Member Avatar for William Hemsworth
0
243
Member Avatar for Simzz

dear all, I have a problem at the following code that causes a segmentation fault and don't know the reason: [CODE] char * cString (char letter, char * string) { char *first= string; char *point= string; while(*string!='\0') { if (*string!=letter) { *point=*string; //segmentation error point++; } string++; } return first; …

Member Avatar for Simzz
0
76
Member Avatar for arcticM

I have a struct WRITER and I made [CODE]typedef WRITER* WriterPtr;[/CODE] also there is another struct called BOOK and a [CODE]typedef BOOK* BookPtr[/CODE] in my BOOK struct I have a [CODE]WriterPtr writerPtr; //pointer to the writer struct[/CODE] now I have a func: [CODE]void choiceA(BookPtr parr, int n,WriterPtr *pWriter, int *psize)[/CODE] …

Member Avatar for Dave Sinkula
0
113
Member Avatar for Hawkpath

So heres the problem. My Grandmother needs to look up stocks, but she has trouble using "FoxFire" to look it up. I need a way where she can enter the name of the stock she wants, and the program enters it into a google search and searches for the stock. …

0
74
Member Avatar for nateuni

I am getting this error message, but I am not sure what I am doing wrong? Here is a edited snip-it of my code - [code=c] void WriteProgram(clientProgram *ptrToProgram, int *ptrTotalWkOuts, int *ptrNumOfEx) { int wkOut = 0; clientWorkout *ptrToWorkout; int *autoPopulate = (int *) calloc(1, sizeof(int)); clientWorkout *ptrToFirstWorkOut = …

Member Avatar for Tom Gunn
0
675
Member Avatar for Gaiety

Hi , i am using the following function to verify whether a given tree is balanced or not. its working for some inputs and not working for others 1) 15 2) 15 10 3) 15 10 25 ( the above are balanced ok) 15 10 25 7 12 16 11 …

Member Avatar for dkalita
0
112
Member Avatar for magicor

The regular shell allows a user to run a process in the background by ending the command with an &. I was asked to write a C program to do a similar job above. How can i write a background process ? Many Thanks !!

Member Avatar for dkalita
0
90
Member Avatar for kyumi419

how to make a program that will ignore the highest value and the lowest value, but will get the average of the remaining values.. for example: there are 6 inputted grades, then the 4 middle values should get their average.. and will ignore the highest and lowest..? :)

Member Avatar for dkalita
0
130
Member Avatar for MrMoogles

Hey! Im new to this C++ stuff and the first major problem I run into is a two dimensional array. I have to declare the array and store data values from ANOTHER data file. I have some of the code written down. Please help and tell me what I'm doing …

Member Avatar for necrolin
0
762
Member Avatar for dheerajsuthar

Hi, I was honing my linux programming skill when this nuisance started bugging me. I wanted to create an empty file creator program. While creating a large file it must print # for progress bar. But the output shows it happening reverse way. ie. first it copies file and shows …

Member Avatar for dheerajsuthar
0
170
Member Avatar for adi.shoukat

Bellow is the piece of code that causes Segmentation Fault: (in Linux Segmentation Fault is usually due to illegal memory access) else if(intData==3) { FILE *fp; int ch; if((fp = fopen("file.txt","rb"))==NULL) { printf("Cannot open Source file.\n"); exit(1); } while((ch = (int)fgetc( fp )) != EOF) { printf("%s",(char*)ch); send(client, (char*)ch, 1,0); …

Member Avatar for Ancient Dragon
-1
113
Member Avatar for need

Program needs to read the students' first name,last name and test scores.Suppose that class has 20 students.Use an array of 20 components of type studentType. Output : last name followed by comma,space first name , score, revelant grade, and find the highest test score, print names of the students having …

Member Avatar for VernonDozier
1
98
Member Avatar for MStan537

This code was originally for an assignment. I met the requirements of the assignment but wish to expand the code to further check for valid input. I am quite new at this but trying to learn... Anyway, the problem is this. I can check if the float is non-negative with …

Member Avatar for MStan537
0
171
Member Avatar for ching1007
Member Avatar for manavsm

Error: assignment makes integer from pointer without a cast ..i want to build an student database using linked list and in c language...but i am unable to create nodes for each variable like age,name,...i did not post the entire program but the concept is in the code...plzzz help..just tell me …

Member Avatar for yellowSnow
0
1K
Member Avatar for nateuni

Hi, I have a struct that contains many different datatypes including arrays of other stucts, ints, floats, chars, char arrays etc. I have dynamically declared a ptr to the struct in main. I then pass the ptr deep into my functions and sub functions. It is a struct that holds …

Member Avatar for nateuni
0
130
Member Avatar for serkan sendur

does windows OS come with any built-in c compiler? without downloading any compilers can it compile c or any other language?

Member Avatar for yellowSnow
0
2K
Member Avatar for Samyx

[code]void swap (int *first, int *second) { int temp = *first; *first = *second; *second = temp; } int main () { int i = 5, j = 6; swap (i, j); printf ("i=%d j=%d\n", i, j); } [/code] warning: [37] $ gcc -o ex321 ex321.c ex321.c: In function `main': …

Member Avatar for Samyx
0
81
Member Avatar for johndoe123

Can some help me with a random between two choices ? Something like: L = random(A, B); and in L to have A or B. Thx.

Member Avatar for Nick Evan
0
10K
Member Avatar for Samyx

I am using the file ex3test.c to run the following program, but the UNIX gives the errors: [38] $ gcc -o ex3test ex3test.c Undefined first referenced symbol in file discrete_uniform /tmp/scratch.hYayTQ/ccRDoT1o.o printFirst /tmp/scratch.hYayTQ/ccRDoT1o.o addToList /tmp/scratch.hYayTQ/ccRDoT1o.o printSecond /tmp/scratch.hYayTQ/ccRDoT1o.o disparity /tmp/scratch.hYayTQ/ccRDoT1o.o clearList /tmp/scratch.hYayTQ/ccRDoT1o.o ld: fatal: Symbol referencing errors. No output written to …

Member Avatar for Samyx
0
176
Member Avatar for geoffy0404

[CODE]int main() { int assignment1[30]; " "; int assignment2[30]; " "; int assignment3[30]; " "; int assignment4[30]; " "; int assignment5[30]; " "; int assignment6[30]; " "; char totalPoints = "assignment1; + assignment2; + assignment3; + assignment4; + assignment;5 + assignment6;"; printf(" Grade calculator ... By Geoffrey \n\n"); printf(" Please …

Member Avatar for chesspest
0
119
Member Avatar for kyumi419
Member Avatar for Tom Gunn
0
56
Member Avatar for Tajna

Hello! I wonder how and where can I see a sqlite database that i have created in c++, if it is possible at all? I would like to see if the db exist, and what are the inputs, to check if i have inserted valuations properly.. Thank you. T :)

Member Avatar for Tajna
0
79
Member Avatar for dragonbone

I try write about binary tree , but i have some troubles , I insert some symbols into binary tree by 2 function insertLeft () and insertRight () ...When i display the symbols i see to lack some symbols .. who can help me ???thank very much [CODE]#include<stdio.h> #include<conio.h> #include<string.h> …

Member Avatar for dkalita
0
218
Member Avatar for movie55

Hi guys, I was running a simple code on Fedora 11. it has this error " segmentation fault". The code is too simple to have any mistakes........ Can anyone help me with this? What is this "segmentation fault". Thank you very much. #include "stdio.h" int main() { int T[1001][4001]; int …

Member Avatar for dkalita
0
76
Member Avatar for TGeorge824

Can you return an array of structs in a function? I'm supposed to make a linked list where the node contains an array of structs. I'm using a grocery list thing as my array of structs. [CODE] struct grocery{ char *name; float price; }; struct node{ struct grocery list[5]; //no …

Member Avatar for dkalita
0
127
Member Avatar for Creator00

Hello! Could You please help to solve this? My question is how to reverse a number in decimal notation using recursive function. 1234 => 4321 2 => 2 20 => 0 20000 => 2 (yes!) 0 => 0 The maximum length of test input is 5 numbers. No need to …

Member Avatar for Creator00
0
124
Member Avatar for kutchbhi

Currently I am reading this book -> Microsoft - Programming Windows API 5th . But it was released in 1998 . The very first Hellowin program in this book seems incompatible with xp sp3 (it didn't mention something that needed to be #defined). So can someone point me to a …

Member Avatar for marco93
0
142
Member Avatar for russey123

I was just wondering if anyone could help me get a good compiler for C. Im taking a intro to c class and my compiler is not the greatest. The key word is i need a good free one. If anyone know of some good ones please let me know …

Member Avatar for kvprajapati
0
78
Member Avatar for rfm

I am trying to print out hello fred and I managed only to print out hello. what change do I need to make to print fred too. [code] #include <stdio.h> #include <string.h> #include <stdlib.h> // // A short program to print the string "Hello, Fred" // int main (int argc, …

Member Avatar for Samyx
0
100
Member Avatar for alvalany

Hi friends, Now I feel that I am pretty good in C. Want to do something really interesting.Does any one have ideas of creating useful 'softwares' in C :) Pls guide me..

Member Avatar for fatihpiristine
0
127
Member Avatar for kavy
Member Avatar for nateuni

Hi, In c if I have a return value and do not catch it, will this cause any problems in my program? Or should I just catch it in some dummy variable and discard it? In spite of googling.. I can't find any info in how c behaves in this …

Member Avatar for gerard4143
0
131
Member Avatar for vileoxidation

Okay, I am working on a homework assignment for my class in which we are supposed to use pointers for all of the arrays in the functions. Here is what I have so far for the printArray function, which is supposed to print the members of the array horizontally. It …

Member Avatar for Golam Kausher
0
193
Member Avatar for oling

So, I am learning C and have this newby problem. This is my snippet: [CODE] #include <stdio.h> main() { char x; unsigned y; x=0xFF; y=0xFFFF; printf("Size of char: %d-bits\n", sizeof(char)*4); printf("Size of int: %d-bits\n", sizeof(int)*4); printf("\n0x%X in decimal: %d\n", x, x); printf("\n0x%X in decimal: %d\n", y, y); return 0; } …

Member Avatar for oling
0
2K
Member Avatar for jdub69420

#include <iostream> using namespace std; class Fraction { public: Fraction() : num(0), denom(1) {} Fraction(int num, int denom) { setNum(num); setDenom(denom); } int getNum() const { return num; } int getDenom() const { return denom; } void setNum(int num) { this->num = num; } void setDenom(int denom) { if (denom) …

Member Avatar for StuXYZ
0
128
Member Avatar for jralexander137

I'm having trouble figuring out what exactly I'm missing in this Byte reversal method. For example is should take 0x01020304 and flip the bits to 0x04030201. I've attached my output giving the errors and here is my code: [CODE]/* * reverseBytes - reverse the bytes of x * Example: reverseBytes(0x01020304) …

Member Avatar for codeguru_2009
0
241
Member Avatar for jralexander137

I am having trouble understanding how to implement these problems in C using bit operators. I understand the basic logic gates and when I work them out on paper they work just not code wise. Any insight/help would be great. [code=c] /* * bitXor - x^y using only ~ and …

Member Avatar for jralexander137
0
914
Member Avatar for serkan sendur

the following escape sequences cause [] in listview. Is there any way to fix it? Form1.cs : [CODE]using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace newLineInListView { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, …

Member Avatar for kvprajapati
1
389
Member Avatar for MxDev

hi guys, Is there any tool for C# that shows the running fragments of source code at runtime or at least facilitate the navigation into source code I mean reading the source code.

Member Avatar for papanyquiL
0
137
Member Avatar for rakeysh verma

I want the following. Write a program that implements the FIFO and LRU page-replacement algorithms ( Virtual Memory) 1) Read the size of reference string from keyboard 2) Generate a random page-reference string where page numbers range from 0 to 9 3) Create a input file with generated reference string …

Member Avatar for ajay.krish123
-1
250
Member Avatar for calleriq

Info :Compiling C:\tmp\lab2.cpp Warn : lab2.cpp(56,16):Possible use of 'choice' before definition Error: lab2.cpp(60,5):Type mismatch in redeclaration of 'mainProgram()' Error: lab2.cpp(60,5):Declaration syntax error Hi everone, I am new to C++, please help. After I compile (using borland V5.02), I got these above prolem, please let me know what's wrong and this …

Member Avatar for Nick Evan
0
151

The End.