15,551 Topics

Member Avatar for
Member Avatar for yuzhang

Hi guys: I have a very strange problem here. Under Linux Mandriva Powerpack 2006, KDE I "make" the program I wrote successfully in the terminal, without any errors. And I could see there was an executable file generated in the same folder. But when I typed in the program name, …

Member Avatar for Salem
0
81
Member Avatar for yuzhang

Hi all: Try to do some programming under Linux. The programme I am writing is supposed to read all the char from a file via "command in line argument (i.e. agv[i])" and via redirection (i.e. read <FILE_NAME. In my program, I have written: FILE *stream; stream = fopen(argv[i],"r"); if (stream==NULL) …

Member Avatar for yuzhang
0
385
Member Avatar for yuzhang

Hello all: I successfully use `(int)i=fgetc(stream)` to read data from a file. But the problem is: All the data in the file are integers, like 3 0 2 3 0 0 1. (with a space between every two integers) Code: for(i=0;(i<100)&&((n=fgetc(stream))!=EOF)&&(ch!='\n');i++) { buffer[i] = n; printf("%d=%d ",i, buffer[i]); /*For debugging …

Member Avatar for Ancient Dragon
0
149
Member Avatar for HackWizz

Hi.. Could any one tell me about... 1) What is top-down approach(POP) and bottom-up approach(OOP) and the difference between them.. 2) Different types of containership (might be with exs..) Thanks for the help

Member Avatar for HackWizz
0
104
Member Avatar for lchamarthi

Hi Everybody! First of all i would like tell my sincere thanks to founder of this site and people sharing the information. I am Newbie to this forum & to C language too.. Now i want to start to learn C. Could any body suggest/send me some quick start & …

Member Avatar for SpS
0
181
Member Avatar for yuzhang

A newbie here. I try to: Using MS Visual Studio 2005; Programming some simple C programs; Want to open a text file and read whatever it the file into a member of a struct. First of all, which type is this "FILE" anyway? Secondly, does the definition of "stdin" include …

Member Avatar for yuzhang
0
184
Member Avatar for breal
Member Avatar for dubeyprateek
0
116
Member Avatar for degamer106

OK.......right now i'm learning about binary tree traversal and this problem looks like a total killer to me. Here's it is: Write a program that takes as input the preorder and inorder traversals of a binary tree, and produces as output the level-order traversal of the tree. All i gotta …

Member Avatar for degamer106
0
268
Member Avatar for remedius

Hello! I just want to understand DDK unidrv example. As far as I've read unidrv can include two plug-ins. So,I try OEMDEV structure to send some data from one to another. But when I add some more fields in OEMDEV stucture (I mean besides OEM_DMEXTRAHEADER and dwDriverData, which are happened …

0
114
Member Avatar for fraley118

write a document that would outline dev-c step by step how to create a win32 dialog based application

Member Avatar for fraley118
0
85
Member Avatar for YoTaMiX

Hello :-) I have build a task of Linked List but for some reason , after i break the Input sequence by entering the same INT value twice in a row , the menu appears twice . howcome? Thank , Code Attached . Yotam

Member Avatar for Ancient Dragon
0
78
Member Avatar for jack999

Write a C-Program that swaps the elements of 1-D array (10 elements) : Example: If the given array is: 5 8 9 2 3 1 11 17 43 6 The new array will be: 6 43 17 11 1 3 2 9 8 5 Your program should consist of the …

Member Avatar for Lerner
0
180
Member Avatar for puppy

Hi, Can someone tell me how to fix the function below. I am getting this compile error regarding the last line: cannot convert `const double' to `const double*' in return What should I return according to the function parameters I've written? Thanks. [CODE] const double * maximum(const double a[], int …

Member Avatar for dubeyprateek
0
109
Member Avatar for pnjeim

Hey there, I have a large program in Matlab that I have to translate into C. Is there any function or program that can do that automatically? Thanks, Patrick

Member Avatar for Dave Sinkula
1
758
Member Avatar for Jawaher

Thank you cscgl for your reply, I hope you reply me again !! PLZ, I need the code of SJF in c it is emergency and must be submit tomorrow. plz help!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Member Avatar for aniseed
0
149
Member Avatar for marten

I need to calculate the time of execution in millisecond, and this function should beAcurrate as possible. I asked one of my friends and he gave me one good function that do that and accurate, but there is linking Error, because this function works under Linux and I am works …

0
107
Member Avatar for bigjoke

Hi everyone, How do you think i could use one type of structure to define a range of shapes (like line, circle, rectangle, triangle). What things do they have in common and what special info i might need for some of them. How could i make a single drawing func …

Member Avatar for bigjoke
0
121
Member Avatar for puppy

Hi, If a function takes a pointer as a parameter as in void set_owner(Person* p) how would I write this code? If it wasn't a pointer, I know I'd just write something like void set_owner(string p) { owner = p; } Thanks in advance for your help.

Member Avatar for puppy
0
196
Member Avatar for john_hasan

Hi friends, i simply want to tell you that i was given a project about c language. in this project i have to build a database of an airline. which have records of one airport's different flights , their arrivals,departures, or it have connecting flights. and other this kind of …

Member Avatar for Lerner
0
114
Member Avatar for Acidburn

Hello guys i keep getting a [quote] Unhandled exception at 0x7c177ac0 (mfc71d.dll) in LSMUtility.exe: 0xC0000005: Access violation reading location 0xcdcdcdbd. [/quote] However according to MSDN the code is right: [code] void CTemp::OnDelete() { // TODO: Add your control notification handler code here CLSMUtilityDlg *main_dlg = (CLSMUtilityDlg *) GetParent(); if(pos != …

Member Avatar for Acidburn
0
561
Member Avatar for schmintan

i want to begin to write apps for a PDA. it would give me an incentive to learn C. i have expirience in C# and visual basic, but i want to get to know C. would i be better to write programs for a windows based pda, or for a …

Member Avatar for Salem
0
177
Member Avatar for newpic

<<moderator edit: split from [thread=5396]here[/thread] -- don't resurrect dead threads!>> I have the EAccessViolation problem too, I have a COM port Communication program that run in the Window 98 with no EAccessViolation, but it will pop up a window with error message say, "Project isicontrol.exe raised exception class EAccessViolation with …

Member Avatar for Dave Sinkula
0
108
Member Avatar for musicmancanora4

Sorry for posting again guys but i have fixed up teh string copies to copy the data into each struct variable. But still when i traverse through the linked list it does not print out anything after it reads the file. For some reason it may not be copying at …

Member Avatar for Lerner
0
167
Member Avatar for musicmancanora4

Hey guys im reading in a text file with several fields iv tokenized the '|' so that it only reads the fields categoryId, drinkType, the categoryName, and categoryDescription. My question is how come when i read the file and copy the reading buffer "temp" into each struct it does not …

Member Avatar for musicmancanora4
0
156
Member Avatar for rpd_gnv

i having a problem on how 2 save the animal name each time i create a new animal...can any1 please help me solve this problem on how 2 do the save function to save the animal name that i had created...thank you very much [code]#include <cstddef> #include <cassert> typedef char* …

Member Avatar for iamthwee
0
155
Member Avatar for degamer106

Currently, I've been reading about Dynamic Programming in this book and I don't really see the difference between bottom-up dynamic programming and top-down dynamic programming. It seems like both of these techniques do the same thing - compute, save, and finally check to avoid needless recomputation. Any tips??

Member Avatar for iamthwee
0
90
Member Avatar for iamthwee

Hullo, I'm trying to make a write a program to automatically create a jar file in java. I've got this far and this works. [CODE]#include <windows.h> #include <direct.h> #include <fstream> using namespace std; int main() { chdir("C:/j2sdk1.4.2_04/bin"); system("javac Saluton.java"); system("java Saluton"); remove ("Saluton.class"); return 0; }[/CODE] But I was wondering …

Member Avatar for iamthwee
0
564
Member Avatar for YoTaMiX

Hello :) i need to write a program which gets from user number and index ( 0 <= number <= 255 , 0<=index<=7) . then to add up to the number in bitwise a 1 in the place of the index : if number is 102 which is 01100110 and …

Member Avatar for Bench
0
197
Member Avatar for tippytoe

Hi - The assignment is to write a C program that prompts the user to enter a line of text up to 69 chars, then convert the text to upper and lower case. The program is required to use pointer notation, not array notation. The program needs to setup a …

Member Avatar for Salem
0
167
Member Avatar for regbrz

Hello, I am with problems I need to Implement urgent a Simplified Computer (CS). This computer will receive as entrance parameter the configuration of duration and it arrives of processes, according to example to proceed. [B] Process [/B]1 2 3 [B]Arrival [/B]1 2 3 [B]Duration [/B]5 2 4 After receiving …

Member Avatar for Salem
0
216
Member Avatar for puppy

Hi. If I want to generate random numbers between -1 and 1, do I need to write a function to do that or is their something in the stdlib that can do it? Thanks.

Member Avatar for puppy
0
178
Member Avatar for ernie

I’m looking for a way to access the parallel port; I have run UserPort in windows which created a service to open the port. However this solution is not very portable, or even safe. Also, I cannot write to 890, which is the control register and required for changing the …

Member Avatar for Dave Sinkula
0
121
Member Avatar for qamar2006

Hi all members.. how are you Can any one help me to make a C programming project ? Its an "Air Lines Reservition System" The project is for our C-programming semester in the university and its due to 15 - 4 - 2006 . The requirements is as follow: [quote] …

Member Avatar for Dave Sinkula
0
548
Member Avatar for maxilt

:?: I work on the program to function a Magic square, below as my working program, but I don't know how to print out the magic square using print function any one can help? [code]#include<iostream> #include<iomanip> using namespace std; const int n = 30; int MagicSquareConstruct(int MagicSquare[n][n]); int main() { …

Member Avatar for Bench
0
244
Member Avatar for behrk2

Hey guys- I have to write a program in C, a pretty printer, that will be used in formatting assembly language code. To run the input, a source file must be provided as input for the 1st argument. A 2nd runtime argument is optional and, if present, it must be …

Member Avatar for Narue
1
243
Member Avatar for Acidburn

Hello guys I've got a general question about a Button on a form... ' <<Backward' the function for this button is to go through the CList and display the contenets at that position in the screen. Anyway at the minute ive got a message box saying ' Reached beginning of …

Member Avatar for Ancient Dragon
0
139
Member Avatar for degamer106

This problem is asking me to convert an infix expression to a postfix expression using recursion. I did the exact same problem using stacks (w/o recursion), which was much easier, but on this one, I get stumped constantly when I try to come up with a line of code to …

Member Avatar for Lerner
0
332
Member Avatar for KimJack

Hello all, I am wondering if anyone has any or know where I can get examples of source code using linked list implementation of stacks. It needs to use a class that stores ints that can be retrieved. Anything you all can provide would be great!!!:-|

Member Avatar for MIGSoft
0
356
Member Avatar for Acidburn

How can i display a dialog window with adding a class to it and using the following to invoke it: CClasX dlg(this); dlg.DoModal(); I know you can do it without a class but im not sure how. And second why would you want to invoke a dialog without a class …

Member Avatar for Ancient Dragon
0
99
Member Avatar for smart girl

[COLOR=#000000]hi all I am trying to be much familier with pipes I tried to write a c program that generates the following output [B]from child: I want to print this line twice [/B] [B]from parent: I want to print this line twice [/B] what I get is [B]from child: I …

Member Avatar for smart girl
0
120
Member Avatar for avalloc

I am having problems with a program I am writing. Write a program to read 2 integers. Then call a function to add them together and return the result. Display the result from the "main" program. How would I go on doing this?

Member Avatar for avalloc
0
86
Member Avatar for Acidburn

Hello can anyone explain the following bugs: [quote] Book.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CBook::Serialize(class CArchive &)" (?Serialize@CBook@@UAEXAAVCArchive@@@Z) ViewBooks.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CBook::Serialize(class CArchive &)" (?Serialize@CBook@@UAEXAAVCArchive@@@Z) LSMUtility.obj : error LNK2019: unresolved external symbol "public: __thiscall CBook::~CBook(void)" (??1CBook@@QAE@XZ) referenced …

0
48
Member Avatar for regbrz

Heloo! I found codigo well very interesting, but the same it considers that all the processes arrive in instant zero, as I can make to consider arrivals in aleaórios instants. [code]* Scheduling Simulation*/ #include <stdio.h> #include <stdlib.h> /* Process Data Structure */ struct process { int pid; /* Process ID …

0
311
Member Avatar for Acidburn

MFC program seems to always report the following error when I click the 'OK' button to exit the program: Run-Time check failure #2 - stack around the varible 'dlg' was currupted Can anyone explain this? if i click continue, then it just closes and returns me back to my development …

Member Avatar for Ancient Dragon
0
99
Member Avatar for Rass Saee

Does anybody know how member of function can be a pointer to a function. The following example crashes when I call the member that is pointing to a function. [code]#include <stdio.h> #include <stdlib.h> #include <string.h> #include <windows.h> typedef long fooPtr(char *); typedef struct { fooPtr *func; long cnt; } MyStruct; …

Member Avatar for Dave Sinkula
0
124
Member Avatar for BURNEE

I am having a problem implementing the pivot_r portion of the program. I have all of the rest as we have been working on this program for a while but the darn pivot_r portion is killing me. Please any help would be GREAT! [code]/*-------------------------------------------------------------*/ /* Program chapter5_8 */ /* */ …

Member Avatar for Salem
0
209
Member Avatar for jhdobbins

Alright... first off I hate fgets with a passion :) Anyway, I am wanting to read a file into a 2 dimensional array and then randomly select one of those lines to output... What am I missing here? [CODE]void displayQuestion() { /* fp is a FILE pointer. This pointer will …

Member Avatar for Salem
0
3K
Member Avatar for arrogant

can any body help in implementing linked queues and also iterating it from the external main program????:?:

Member Avatar for SpS
0
115
Member Avatar for ghadahelal

i have 2 write a program that read a long number up 2 10 digits. when i made it int , the compiler made error, then i made it double, the program is ok and calculate everthing ok, but when i need 2 print this number again it is correct …

Member Avatar for SpS
0
172
Member Avatar for YoTaMiX

Evening :) I am trying to run a makefile on a program i wrote. in Borland C it runs smoothly . after running the makefile - all sorts of error appear which i do not understand. i am adding the files (program + header + error DOC ) . [B]Makefile …

Member Avatar for Ancient Dragon
0
144

The End.