18,490 Topics

Member Avatar for
Member Avatar for tyczj

im doing this lab and im so lost on it, i dont know where to start. here is the link for the lab [URL=http://north.ecc.edu/kuroskit/cs111-01-sp05/labs/Lab10%20spg%2005.doc]Lab[/URL] now im not lookin for someone to do it for me just help me out on gettin started. im not sure how to use arrays and …

Member Avatar for tyczj
0
249
Member Avatar for cap2361

I wrote a blackjack game for class and one stipulation is to have a file(fstream). I did get the file stream to work but not like it should. it keeps track of player name and money amount. what i would like to do is give player option to save game. …

Member Avatar for Pikachu
0
181
Member Avatar for wal99d

[B][code] #include <stdio.h> #include <math.h> int main() { double op1,op2; char opp; char *res= "2 ^ 1"; sscanf(res,"%d %c %d",&op1,&opp,&op2); printf("%d\n",op1); printf("%c\n",opp); printf("%d\n",op2); printf("====\n"); printf("%d\n",pow(op1,op2)); /* the output is for sure 2 */ } [/code][/B] [COLOR=Blue][B]but it output : 1073741824 <-- ??? I don't know what here so please any …

Member Avatar for wal99d
0
360
Member Avatar for Sukhbir

what will happen if we free the same memory two times in C. for exam........ char *k=(char *)malloc(4); free(k); free(k);

Member Avatar for Narue
0
98
Member Avatar for thlegendkiller

a program that will display teh string "HELLOWORLD" in ascending style [code] #include<stdio.h> #include <conio.h> void main() char str[]="HELLOWORLD" int i. choice; while(1) { clrscr(); printf("(1) Ascending style\n"); printf("(2) Exit\n"); printf("enter your choice:"); scanf("%d", &choice); printf("\n\n"); switch(choice) { case 1: [B]for (i=0; str[i]!='\0';i++) //--> Please!!! this is where i need …

Member Avatar for Narue
0
383
Member Avatar for winbatch

Hi, I'm trying to write code such that my class can be used like so: To accomplish this, I'm trying to overload the + operator of my class to return a string. I am able to do this, but when I try and do the operation above, I get: Error: …

Member Avatar for Narue
0
318
Member Avatar for ikanku15

my programme has the strcmp. but i dont understand what it is use for. while((strcmp(current->bed_num,beddelete))!=0) bed_num and beddelete i have declared as an integer variables. when i run the programme, it stated that invalid conversation from 'int' to 'const char*' what does it mean?? thank you

Member Avatar for Narue
0
279
Member Avatar for feda

please ,if one can help how to implement caht application using socket in c/unix or help me with example code of that with my thankssssssssssssss feda

Member Avatar for feda
0
85
Member Avatar for wal99d

[COLOR=Blue][B]Is the following code correct:[/B][/COLOR] [CODE] char * cmd="ls -l"; /* Unix command used for listing */ char * spCmd; spCmd = strtok(cmd , " ");/* it divides the cmd in to tokens */ execvp(spCmd[0] , spCmd);[/CODE] [COLOR=Blue][B]output of this code to execute command that is written in cmd ?[/B][/COLOR] …

Member Avatar for wal99d
0
268
Member Avatar for wsn

hello everyone, I'm writing a function traverse for a doubly liked list, I can only use these private members: Node *current , int count, int mutable current_position and one one private member function void set_position(int position) const The post condition of member function traverse is the action specified by function …

Member Avatar for wsn
0
150
Member Avatar for haskari
Member Avatar for haskari

plz anyone urgently send me the coding of graph create of trig nometric functions in c language.i have to summit my project with in 18 hours from now on .sos.

Member Avatar for Narue
0
130
Member Avatar for atrixnet

When trying to compile a C program including the code below, I keep getting this error and I don't know what to do to fix it. Please explain if you can! Complete code may be downloaded from my website at [url]www.atrixnet.com/cquestion.zip[/url] (It's only 2 Kb) I suppose I'll attach it …

Member Avatar for Narue
0
637
Member Avatar for Fasola

[B]How would I make a "computer reservation system" for public computers?[/B] RESERVATION PROCESS: Step 1: Enter PIN at Reservation Computer (if pin is valid go to step 2 else back to step one) Step 2: Select SEATED or STAND UP computer Step 3: Select OK for earliest reservation or CANCEL …

Member Avatar for Fasola
0
216
Member Avatar for nizar4445

hello all can anybody help me with this tutorial question please??? This is only part one and i think i can manage the rest of it if uoy help me with that part. I know that you don't help students with their homworks or assignments but I have completly no …

Member Avatar for sinrtb
0
149
Member Avatar for calenna

i have a dialog box with a grid attached to it. No matter what I do, this dialog doesn't have focus untill after its been clicked on. In order to click on a button you have to click twice. The box is active, it just doesn't seem to have focus …

0
83
Member Avatar for jhdobbins

heres my main [CODE]int main(){ int hours[50], cnt = 0; char grades[50], gpaForOneClass[50]; string course[50]; float gpa = 0.0, totalHours = 0, gpaSum = 0; gradevalue in; while (1) { cout<<"\nEnter a course, the letter grade received, and the credit hours. "<<endl; cin >> course[cnt]; if (course[cnt] == "quit" || …

Member Avatar for Dave Sinkula
0
854
Member Avatar for Gink
Member Avatar for Gink
0
391
Member Avatar for marjan_m

Hi any one who can give help me from the book of Computer Graphics by Donald Hearn? I want help abt the exercises thankx

Member Avatar for marjan_m
0
123
Member Avatar for sinrtb

I know this is a stupid questions how do i send this : struct Activity { int i, // Beginning node number. j; // Ending node number. float pt, // Pessimistic time. prt, // Most probable time. ot; // Optimistic time. char desc[21]; // Activity description. } p[51]; into this: …

Member Avatar for sinrtb
0
146
Member Avatar for Menohac

Ok i play this game and i need to add a wedding system onto the server which runs in C language the first box is the variables.... [CODE]// Variable Notes: // // event_wedding - 1 signifies marriage // $groom$ - Groom's name storage // $bride$ - Bride's name storage // …

Member Avatar for Menohac
0
216
Member Avatar for monkeymule2

What do these errors mean? main.obj : error LNK2001: unresolved external symbol "public: __thiscall Weekly::Weekly(void)" (??0Weekly@@QAE@XZ) main.obj : error LNK2001: unresolved external symbol "public: __thiscall Daily::Daily(void)" (??0Daily@@QAE@XZ) main.obj : error LNK2001: unresolved external symbol "public: __thiscall Onetime::Onetime(void)" (??0Onetime@@QAE@XZ) Daily.obj : error LNK2001: unresolved external symbol "private: static int Daily::num_of_Dappointments" (?num_of_Dappointments@Daily@@0HA) …

Member Avatar for Dave Sinkula
0
145
Member Avatar for stebel

Hi I'm working on a piece of assembly procedure that would enable me to return a double value (generated in asm module) to C code. Up to now never produced such a code, so would be grateful if you could assist me a bit. I know that I should leave …

0
350
Member Avatar for Acidburn

I've got a program which works but when I try to implement a destructor in the base call and make it a virtual pure function it doesnt want to work with the rest of the system ... [quote] circle.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall Shape::~Shape(void)" (??1Shape@@UAE@XZ) …

Member Avatar for Acidburn
0
153
Member Avatar for Gink

I've been asking around places about how I would intercept all UDP packets being sent from my computer and re-send them at a later time. I basically want to pause the packets for 100 milliseconds then send them wherever they were going. I heard something about writing a DNI driver …

0
73
Member Avatar for gambit56

Hello!!! Im new to this forum, I'm also quite new to C programming and im having some problems with a program It's a bit long winded so youll have to be patient :-| The program is about a football league First Question: Entrying zeros into a variable to be shown …

Member Avatar for gambit56
0
150
Member Avatar for gnoon

I've already turned this in for (I hope) partial credit, so I'm not asking for help in getting a grade. However, future assignments build off of this type of program, so I do need to understand how to make this work. I believe it is painfully obvious that I am …

Member Avatar for marinme
0
190
Member Avatar for frankieb

Hi All, Can someone look at this code and tell me how I may use the Array (CPoint point) to draw the lines based on user input in text box. The program works fine without the array right now. I want to try to use an Array instead. I'm trying …

Member Avatar for frankieb
0
144
Member Avatar for compshooter

I have three doubly linked list queues and I need to sort them based on a variable that each object has namely its job length. I am attempting to code for a shortest job first processing program. I already have most of the program complete but now I need to …

Member Avatar for compshooter
0
261
Member Avatar for byte_me

[code] /* v_regdb.c ****************************************************************/ /* */ /* */ /* */ /* This is a maintenance program for an existing Vehicle Database. */ /* The program is an interactive menu system, which allows the user to */ /* edit, delete and insert records into an existing database. */ /* All input …

Member Avatar for byte_me
0
205
Member Avatar for blackdove

:confused: This is my first recursion project and i have no idea if i'm even going about it the right way...It's a palindrome checker, which checks for integers. I can't check it character by character as a string. It compiles clean but when i execute it i get weird results …

0
102
Member Avatar for xerxes1986

alright i am trying to write a program that implements a class AirborneLocation that stores info on planes in the sky yada, yada, yada....i won't post the whole src code cuz it is hella long but i will post the section that gives me the compiling error [CODE]ostream& operator<< (ostream& …

Member Avatar for Narue
0
200
Member Avatar for atrusmre

I am currently trying to add an edit box to my program. Everything is find until I add a variable to the edit box. The program runs fine until it is terminated, then I get an assertion error. Any ideas what could be causing this?

Member Avatar for Narue
0
155
Member Avatar for eleet

I first read in data from a file. Then the user is prompted for a name of a person trying to enter the party. If the name of a person trying to get in does not match any name on the invitation list, the program should print a message indicating …

Member Avatar for Dave Sinkula
0
154
Member Avatar for robert_sun

Can anybody help me on this problem: I am writing a simulation program with several files. In a header file, I declared e global variable in hope that all other files could use it. so i put down: #define size 100 int memory[size]; in the header file memory.h. However, there …

Member Avatar for Narue
0
176
Member Avatar for cblue

i was wondering how to strip off digits one by one and store them into an array so i can sort them. For example if the user entered 7216. take the 7 stor into cell one, take 2 store it cell 3 ettc and then sort it so it looks …

Member Avatar for Narue
0
248
Member Avatar for Mr Violent

I'm currently writing a game in DirectX without using the MFC structure. I am manually crating the window by including windows.h and manually creating the window by using windows functions. I am a bit confused when it comes to using strings. I would like to use the CString class, as …

Member Avatar for Narue
0
521
Member Avatar for Rose Aashii

Hye all!! here is an program statement i don't know how to do it :o ..so plz let me know itz solution... program is written below:- [B]Write a program that will get 10 numbers between 20 and 100 and store them in one dimensional array of type int , as …

Member Avatar for Narue
0
287
Member Avatar for Sluga

Hi, i'm doing a program in OpenGL and need some help with arrays. Basically I have a structure called ObjectNode which is used to implement a linked list with two data members, an int for the object type and an array of IntPoints (IntPoint is just a simple structure to …

Member Avatar for Sluga
0
2K
Member Avatar for YoungCoder

Hi there, I have an image that is split into lots of little images that when flipped through would effectively animate the character. :cool: How would i go about playing through the images, i assume i would somehow map the image into a two-dimensional array and then just run through …

Member Avatar for YoungCoder
0
264
Member Avatar for nizar4445

Please could you give me an example of sorting an array and[B] how to call the [/B] [B]function at the main [/B] thanks a lot :o :rolleyes: :rolleyes:

Member Avatar for vegaseat
0
239
Member Avatar for Member #13457

In file proceesing how can i find the renamed file.... meaning....i created 2 files named derrick.txt and alex.txt and in the program when i input derrick, the program will look for the file derrick and open the file, and if i enter alex, the program will look for alex.txt thank …

Member Avatar for Member #13457
0
90
Member Avatar for jonnie83

When trying to build me program the error message [COLOR=Red]LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16 Debug/Marking Program.exe : fatal error LNK1120: 1 unresolved externals[/COLOR] occurs. I am not sure why this happens, any thoughts

Member Avatar for Dave Sinkula
0
332
Member Avatar for meabed

This is a short list of recommendations on how to use C++. My experiences are from using gcc 2.8.0 and Visual C++ 6.0. I had to have things compatible between these two compilers, and between Unix and Windows. [b]Contents[/b] [color=#800080]IO of binary files[/color] [color=#800080]When are destructors called for local variables[/color] …

0
150
Member Avatar for lulug76

Hi am new to programming and I really need some how to check an array to see if a number already exists. I read the tutorials about random number genertors but I am just not getting how to check if the random generator already generated that number somewhere else in …

Member Avatar for Narue
0
123
Member Avatar for nailzfan

hello all, this is my first time posting. Okay, I'm reading a character array from a .dat file. The character array has 6 elements and I'm supposed to fold the integer values of the character array. The professor wants us to pair up consecutive indexes and add them together. For …

Member Avatar for ssv
0
134
Member Avatar for mel2005

Just wondering if you would help me in my assignment, I've started on them. I've done most of it except the following three questions. (1) Any flight can be brought to the front of the queue ready for deleting (landing) For example if the flight is in the back, we …

Member Avatar for Fasola
0
389
Member Avatar for mel2005

[B] (1) any flight can be brought to the front of the queue ready for deleting(landing) (2) any flight can be diverted to the back of the queue for another airport if the first airport is busy or on runway closed due to an accident. (3)in the flight ID, there …

Member Avatar for Narue
0
151
Member Avatar for nizar4445

(Create a program that will allow the user to enter and analyse a set of data collected from an experiment. The data is to be entered by the user from the keyboard and stored in an array to be processed by the program. It is known that all the data …

Member Avatar for Narue
0
156
Member Avatar for nizar4445

Heeeeeeeeeeeeeeeeelp :cry: :cry: :cry: hello all can anybody help me pleeeeeeeeeeeeeeaaaaaaazzzzzzzzzz!!!!! Create a program that will allow the user to enter and analyse a set of data collected from an experiment. The data is to be entered by the user from the keyboard and stored in an array to be …

Member Avatar for Dave Sinkula
0
165

The End.