15,554 Topics

Member Avatar for
Member Avatar for winbatch

I'm trying to overload my 'Log' class so that I can pass 'endl' to it. Given the obscure nature of the compiler errors for template classes, I'm not sure what to put on the 'right hand side'. For example, these work fine. .. [code]Log & operator << (ostringstream & a) …

Member Avatar for Narue
0
2K
Member Avatar for nizar4445

hello all anybody could please tell me how to change this code to make it read from a file that has unknown no of students in it. now this [I]part[/I] of the programe read only 5 students. could you please help me to solve this problem as soon as you …

Member Avatar for nizar4445
0
268
Member Avatar for innocent_one

Hey.. Can anyone please help me? I am trying to write a round robin scheduler and so i decided that if i got a fcfs scheduler, then all i would have to do is change the process from completing in the processor to it just going into the processor for …

Member Avatar for innocent_one
0
547
Member Avatar for metalking5

please help.I need a programm in C that does what the command copy of dos does with verification.please anyone who can do it help

Member Avatar for Narue
0
79
Member Avatar for fatallah

we need to write simulation program to imitate the behavior of a single CPU system that has a preemtive RR scheduler and the collecting data regarding the operation of the simulation, create a input file to represent process arrival and service times 30 0.7 54 17.28 . . this EXP …

Member Avatar for Narue
0
264
Member Avatar for peter_budo

I'm trying to create class/header for my program which should calculate distanaces between cities declared by array "[I]use[/I]" plus arrays of there coordinates as you see in code below [CODE]// file line.h #ifndef LINE_H #define LINE_H const int cities = 6; class Line { private: string use[] = {"Phoenix", "Baton …

Member Avatar for Narue
0
159
Member Avatar for Valmont

Reference reading directly related to this post: http://www.math.princeton.edu/matalive/Error/index.html http://www.math.princeton.edu/matalive/Error/index.html http://www.math.princeton.edu/matalive/Error/ErrorLab2/LZCompressor.html http://www.math.princeton.edu/matalive/Error/ErrorLab2/LZCompressor.html Hi all. I've just started learning the ways of compression. I decided to start with the LZ algorithm. The resource I use is: http://www.math.princeton.edu/matalive/Error/index.html http://www.math.princeton.edu/matalive/Error/index.html I understand the fundamentals of parsing the incoming text. Let's call the container that …

Member Avatar for Narue
0
163
Member Avatar for tyczj

what is the header to time code isnt it; #include "pctimer.h" i keep gettin an error saying no such thing

Member Avatar for tyczj
0
281
Member Avatar for rharvison

Hi, all. Thie following is an additional step in the program I previously mentioned [and, by the way, thanks for the responses; most helpful!] The final part of this project is to create [I believe it is called a histogram] of the grade frequency distribution. The program asks for grades …

Member Avatar for rharvison
0
145
Member Avatar for JoBe

Hello ladies and gents, I wanted to ask if this piece of code can be written differently then the way I did: [code] template <class V> void sequence3(V &a, V &b, V &c) { V w; while (a > b || b > c) { if (a > b){w = …

Member Avatar for JoBe
0
184
Member Avatar for yacob_uk

Hi, I have two problems, been bugging me for a couple of days... I have a 32bit float array that has been calculated, I now need to convert it to 16bit int values to be scaled for use. I tried the code: h[N] = int (h[N]*(scale[N]) and that sort of …

Member Avatar for yacob_uk
0
168
Member Avatar for kingofpain

write a program that inputs five integers and passes them one at a time to function [B]even [/B] which uses the modulus operator to determine if an integer is even. The function should take an integer argument and output/return the answer whether the integer is true or false (hint: combination …

Member Avatar for Narue
0
33
Member Avatar for sscheell2000

i'm trying to insert and element in a list in alphabetical order last name first and then first name here is my code but not working please help [code] struct node * Inserting(struct node *tp,struct node *fp) { struct node *last = NULL; struct node *old, *start; start = fp; …

Member Avatar for Narue
0
102
Member Avatar for nucleo

I am writing to console from several threads using printf(). The process is synchronized and it works fine. The problem is that sometimes some of threads freezes (never returns ) at WriteFile() function used to implement printf() and the really strange here is that it returns and everything continues when …

Member Avatar for Narue
0
386
Member Avatar for thomasisaac

Hi, in part of some code i am using there is a message defined by: char message1[133]="Please Select Features"; And then its referenced as: feature_select=message1; And called as a perameter using: UF_UI_select_feature ( feature_select, NULL, &count, &feature_tags, &response) I was just wandering what the [133] part is. Is it just …

Member Avatar for thomasisaac
0
132
Member Avatar for tat2dlady

I have a problem that deals with reading a random access file and creating an index file, which is a file to hold the binary tree of the random access file. I have the index file created with SSN (key), relative address of the SSN in the random access file, …

0
56
Member Avatar for Raiders

[COLOR=Blue][FONT=Arial Black][SIZE=5]:idea: [COLOR=Blue][FONT=Arial Black][SIZE=4][FONT=Arial][SIZE=2]hi everyone, i need some help. My question is , if i want to input a password which is 123456, how do i output the password on the screen using ****** instead of 123456. Do anyone know how to create the source code ???[/SIZE][/FONT][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR]

Member Avatar for Dave Sinkula
0
185
Member Avatar for eilidh

This is an assignment where the server uses a socket to communicate with a web browser however it has to be multi threaded but I am not sure on how to add code for the threads, i have attempted it but got no where. thanks. [code]/******************************************************************** * Systems Programming (COMU311) …

0
81
Member Avatar for Acidburn

Hello, our tutor set us a task to do , which was make a vector out of a class. So I've implemented a basic one but it doesnt work well... its runs ect ... but when you re print the entered elements it doesnt print the correct ones: [php] #include …

Member Avatar for Dave Sinkula
0
164
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
226
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
172
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
314
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
92
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
342
Member Avatar for xanatoes

Microsoft YCMD Software Giveaway! Hey, Microsoft is sponsoring their 2005 annual contest, “You Can Make a Difference

0
109
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
297
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
214
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
73
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
247
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
131

The End.