19,876 Topics

Member Avatar for
Member Avatar for nelly12

this is the code( not a complete code) [code=c] int master(int argc, char *argv[]) { int slaves_count = 0; m_host_t *slaves = NULL; m_task_t *todo = NULL; int number_of_tasks = 0; double task_comp_size = 0; double task_comm_size = 0; int i; xbt_assert1(sscanf(argv[1],"%d", &number_of_tasks), "Invalid argument %s\n",argv[1]); xbt_assert1(sscanf(argv[2],"%lg", &task_comp_size), "Invalid argument …

Member Avatar for thekashyap
0
114
Member Avatar for Marauder_Pilot

Alright, here's what I'm working on now. It's supposed to go through an inputted list of words, pick out actual words and create a numbered list of them, then, where it finds a number in the list, go back in the list from that number, replace it with a word, …

Member Avatar for underjack
0
147
Member Avatar for stringgader

hi, nu member hir, just hav some question regarding this output: [code] 1 232 34543 4567654 567898765 67890109876 7890123210987 890123454321098 90123456765432109 0123456789876543210 [/code] numbers that are alligned with 1 are 3 5 7 9 1 3 5 7 9 these are the middle numbers... does anybody know how to do …

Member Avatar for stringgader
0
297
Member Avatar for nayrb

I have 3 files that i have included in a project(class,implementation,program) The program will not compile. it says system can not find specified file. Should i save all these files in the project folder or ... . It's my first time using project to write a class and all that.

Member Avatar for thekashyap
0
98
Member Avatar for ctrohana

Hi all, I need ur help.. Actually I have to read the data file which containing character and digits. I need to converts some characters into digit. The data file is like: A11111 B22222 B33333 B4444 A55555B66666 B77777 So far my programming is like this: [code=c] #include <stdio.h> #include <stdlib.h> …

Member Avatar for Salem
0
133
Member Avatar for flageolet

Hi I have a sequence that I want to put into a seperate function: The variables I want to take into that function and back to the main function are declared globally. declaring the function and the testing variable: [code]void sanction (); int test[10];[/code] my main function: [code] int main(int …

Member Avatar for WaltP
0
119
Member Avatar for daddeh

hi am new member here... can anyone give the code of this..i've tried to figure out the code to finish this but i cant......pls help me..... here is the output of my case study Enter amount of Loan: 5000 Enter Interest: .10 Enter terms(month):10 550 445 440 435 430 425 …

Member Avatar for WaltP
0
102
Member Avatar for SHWOO

I am coding a class project where I will have a basketball league. The league will include 3 divisions and each division will have 5 teams. Each team will have a number of players and one coach. I must have 5 seperate classes. I already have two classes called person …

Member Avatar for Lazaro Claiborn
0
242
Member Avatar for Shaabangbang

Hello, my prof gave us a problem from the ACM programming contest, we are supposed to write a program that takes a compressed file as input and generates a reproduction of the original uncompressed file as output, the compression scheme requires making a list of the words in the uncompressed …

Member Avatar for Shaabangbang
0
152
Member Avatar for mapaputsi

Can anyboby help me i really dont get the feeling of big o notation, i just want to understand it.

Member Avatar for ~s.o.s~
0
162
Member Avatar for fightfox06

ok need a bit of help. got a program to set up football league table and input all the scores etc etc just tryin to figure a way to add scores and that from there, also the display code seems a bit messy anyway i can put it into a …

Member Avatar for WaltP
0
1K
Member Avatar for donaldunca

I have some problem with linked list FIFO(first in first out). This is my code: [CODE] typedef int datatype; typedef struct node *nodep; struct node *first,*last,*p; struct node { datatype data; nodep *next; }; void create(); void list(); void create() { char *tl; do { p=(struct node*)calloc(5,sizeof(struct node)); p->data=random(100); p->next=NULL; …

Member Avatar for mathematician
0
290
Member Avatar for endsamsara

Hi, How can I open a file input.txt with the form and divide its info in differents arrays __________ n word word word abcdefgijl ijklmnñov wordxvvc ___________ n is a number, that tells me the number of words that follows here n = 3; i only know the number untill …

Member Avatar for WaltP
0
166
Member Avatar for jan1024188

Hello. I use Linux, and I have no experience in windows. I have to write a C++ program that checks if Java is installed. I have no idea how to check that (there is no directory such /usr/bin ). I need this for a Java app and I want check …

Member Avatar for Lazaro Claiborn
0
538
Member Avatar for SHWOO

I was given an assignment to write a recursive function to print a diamond comprised of astrisks (less the dashes) such as: ---* --* * -* * * * * * * -* * * --* * ---* The parameter is the number of astricks in the largest row. I …

Member Avatar for Narue
0
202
Member Avatar for Dave256000

Using the skeleton below #include <unistd.h> // read/write #include <sys/file.h> // open/close values #include <string.h> // strlen int main( int argc, char *argv[], char *env[] ) { // C++ or C code } Write a C++ application myrm that removes (deletes) files passed as command line argument. Use only the …

Member Avatar for Dave256000
0
181
Member Avatar for RisTar

I need to create a function the gets a source string pointer and a destination string pointer , so if the source string will contain - "aaaabbbbbbcccdd" the function will return a destination string that contains "4a6b3c2d" This is my code , but its not working and for some reason …

Member Avatar for ~s.o.s~
0
134
Member Avatar for donaldunca

I'm learning linked list. I have a question: How can I connect 2 linked list ? Thank you!:)

Member Avatar for Narue
0
111
Member Avatar for RisTar

Hi, im trying to create a function that gets two strings , the first string its the source , and the seconed is an understring . the function should return an int with the value of the position that the understring starts in the source string . so that if …

Member Avatar for RisTar
0
105
Member Avatar for nadith_cs

this is my prob. i used goto as follows [code=c] int main() { l1: int x-9; goto l1; return 0; } [/code] this works as infinite unconditional loop is'nt it? this compiles well.which means there isnt an error. so can you explain how this variable declaration works when it get …

Member Avatar for ~s.o.s~
0
127
Member Avatar for Clinton Portis

I am going through some book assignments.. and I am running into some terminology that doesn't make sense to me.. [quote] Impelement this class... Class Cis Float Cisfloat a("325.12315"); a+b a * b [b]14 (exp # bits) 113 (sigment # bits)[/b] 10000........0 bias[/quote] what does the author mean by, "exp …

Member Avatar for Salem
1
132
Member Avatar for Tauren

Does anyone know any Winsock books I need them so I can learn about the functions and the coding about it. So if anyone has any books that They can post about that would help me out ty

Member Avatar for Tauren
0
125
Member Avatar for MiloTN

Hey there everyone^^ Im almost finished on my mighty code of mighty... urm, -ness :mrgreen: The finished code is actually to calcuate displacement thicknesses of various velocity profiles (read from flies as floats) using the trapezium rule. Its sooo close, ive got a few little bugs remaining tho. Firstly, the …

Member Avatar for dwks
0
132
Member Avatar for livingsword

i dont know if this the appropriate forum for this question, I wrote few programs on turbo c++ ide and they work perfectly fine. but when i try to compile the same code in openSUSE 10.2 , i get errors like : clrscr not recognised, clreol not recognised, gotoxy not …

Member Avatar for dwks
0
142
Member Avatar for RisTar

Is there a function that draw 2d objects like boxes and circles . I remember that in qbasic there was a few 2dobjects functions so i thought that there is a chance c will have some too. Thanks .

Member Avatar for Narue
-1
2K
Member Avatar for ajay kandari

[code] #include<stdio.h> #include<conio.h> void values(int a[4]); void main() { int x[4],i; clrscr(); printf(" enter 1st number "); scanf("%d",&x[0]); printf(" enter remaining values "); for(i=1;i<4;i++) scanf("%d",x[i]); values(x[4]); [COLOR=red](cannot convert int to int* and type mismatch in[/COLOR] [COLOR=red]parameter 'a' in call to'value(int *)[/COLOR]' getch(); } void values(int a[4]) { int m,max,min,j; max=m; …

Member Avatar for Ancient Dragon
0
92
Member Avatar for endsamsara

i need a program , that receives an input file with words and a puzzle and gives an output file, with the words and their coordenates in the puzzle. input has the number of words (3 in this case), the words to be found, and the text where the words …

Member Avatar for endsamsara
0
123
Member Avatar for manjurekha

[main() float a=0.7; while(a<0.7) { printf("true statement"); } } how this is a true statement??? though i got some explanation, i'm not satisfied can any1 giv me a exact reason???

Member Avatar for ~s.o.s~
0
48
Member Avatar for livingsword

I've got an assignment which says "Write a program to find complex numbers". Could someone explain the question ...what do i need to do? do i need to check the user input for complex no. ?? im not asking for codes, just the logic. Please help :sad: thanx for reading …

Member Avatar for ithelp
0
114
Member Avatar for Darkmeerkat

I'm having some trouble understanding how Exceptions thrown from constructors work... Let's say I have a class like this: [code=C++] class A { public: A() { if( error ) throw MyExp; } } [/code] If I try to define a variable of type "A" within a [inlinecode]try {} catch {}[/inlinecode] …

Member Avatar for John A
0
135
Member Avatar for MiloTN

Hi there^^ Its my first post on these forums, and as much as I hate it to be a shout for help ive got a problem I could really use someone with a bit of knowledge to help me out with =) My scenario being ive got to write a …

Member Avatar for MiloTN
0
181
Member Avatar for virsa

access c++ private data members without using the " Friend" type main() can be a friend function?

Member Avatar for Laiq Ahmed
0
141
Member Avatar for tirengarfio

Hello, at the third post of this thread: [URL]http://gpwiki.org/forums/viewtopic.php?t=4164[/URL] you can see these two sentences: "if you go to properties and put in as linker dependancies SDL.lib and OpenGL.lib". "and make sure the paths to both the .lib files are in the linker input directory value" Can someone tell me …

Member Avatar for Ancient Dragon
0
101
Member Avatar for torbecire

I would like to make this first function work as the one were i opened it from a file. In this first one i am using arrays the second one uses strings. ignore the masking of the password in the first one i want it to do that and then …

Member Avatar for WaltP
0
100
Member Avatar for ajay kandari

[code=c] /*factirial*/ #include<stdio.h> #include<conio.h> void main() { int n,s=1,i; clrscr(); printf("enter n "); for(i=1;i<n;i++) { scanf("%d",&n); } for(i=1;i<n;i++) { s=s*i; } printf("factorial is %d",s); getch(); }[/code]

Member Avatar for Salem
0
403
Member Avatar for terp410

I am writing a program to prove if a code is a Palindrome or not and must use stacks. I have written a code below that compiles, but when I run it, it outputs the word in an a stack view, but does not follow the rest of my program …

Member Avatar for terp410
0
1K
Member Avatar for developer4321

Hey, for part of my project, I have to implement a Hash Table template. I had to implement several other classes too, and I finished them. But I really don't know much at all about hash tables and templates, and am not sure how to go about this at all... …

Member Avatar for developer4321
0
123
Member Avatar for bigben09

how do you print an array out in reverse order? lets say the program prints out the sum of a problem and that sum is 51. how do i get it to say 15, beccause thatwould be the reverse order?

Member Avatar for kansmish82
0
94
Member Avatar for amirwan

hi i use wattcp to program network Dos programs but when i use the received function in pcpkt.c library it always give me null in spite of that there are many packets are received and i do not know why that function do not gve me any packet

Member Avatar for Salem
0
103
Member Avatar for Schooley

Hello... I was given this forum address by a friend, and I am in need of some C++ help. I have just recently began learning about C++, and have been given a series of programs to do. I have completed the 4/5, and they work well. The following is the …

Member Avatar for Schooley
0
93
Member Avatar for torbecire

I want to type a word in, but i do not want to see the characters. Example: If i type "What" i want to see "****", but the words have to be stored in the '*' any ideas. I know they is a way to clear the stream after i …

Member Avatar for John A
0
99
Member Avatar for boujibabe

I have a function called rounds that that carries out a round for a two player guessing game the score is calculated based on the time taken and the attempts used [code] void rounds(int rand, int guess) { int attempts=1; const int MAX_ATTEMPTS = 5; int score; long int timetaken; …

Member Avatar for WaltP
0
133
Member Avatar for belhifet

I want to implement tab completion to my program, similar to a unix shell's. Like if the user types comp and hits <tab>, completion would appear (suppose there's a file named "completion" in the current directory). Someone suggested using the readline library, but it seems too difficult to use that. …

Member Avatar for WaltP
0
119
Member Avatar for priya_pikku
Member Avatar for Sturm

I have a debian base install system and am having problems with performance via allegro. I made a pong game and when I ran it on windows it ran fine but on linux it lags soooo much. Whats the problem?

Member Avatar for John A
0
102
Member Avatar for n.aggel

hi, i want to binary write the fields of class to a file.Mainly i want to serialize only the public fields not the private ones or the functions.... [code] class a { public: int a; int b; protected: void function1(); void function2(); private: int c } [/code]

Member Avatar for Ancient Dragon
0
83
Member Avatar for Beshur

Hi! Sorry, if something like this was published, but I still have a question. I'm not a C developer at all, so may it's not a correct place for the topic, but... I have many MP3s without any ID3 tags, but I would like to add some. All of the …

Member Avatar for Beshur
0
95
Member Avatar for atilla

I am encountering some problems in turboC v2.01....whenever I compile a prog. and error says that " the compiler is unable to include the library stdio.h and math.h" Please help!!

Member Avatar for goutham_see
0
445
Member Avatar for donaldunca

I have a question: I have a file named "data.inp". This file have numbers: 6 3 5 4 5 2 5 3 1 5 8 7 9 2 5 6 3 5 8 4 6 If I want more line of numbers, I will add numbers. But I don't know …

Member Avatar for donaldunca
0
231
Member Avatar for srinath33

The End.