49,761 Topics

Member Avatar for
Member Avatar for ankit_nasa

[B]Run the algorithim for n>6. to introduce non- determinism, number each process 0..n-1; In each iteration, generate a random number r<=n.choose r processes randomly and allow only the chosen ones to execute the protocol. token sending/ recieving can be emulated by updating appropriate recieved[] bits. ignoring the diffusion part, see …

Member Avatar for Narue
0
70
Member Avatar for driplet

In BCB, I need to pass a two dimensional array to a function Ratio. I did this without pointers or reference. Could any body else tell me what I should revise if I want to use pointers or reference for input? [code] double Ratio(double a[3], double VA[3][3], int i) { …

Member Avatar for driplet
0
149
Member Avatar for Genar Codina

I have a question related to placement new. When dealing with objects, in order to destroy an object created with placement new it has to be called the destructor of the object explicity; that is: [code] #include <new> using namespace std; //The following command really allocates the splace char * …

Member Avatar for Genar Codina
0
157
Member Avatar for nsesem

i have an assignment about the meeting room capacity , in fact is about write a program that detremines whether a meeting room is in violation of fire law regulation regarding the maximum room capacity. i've trid so hard but right noe I'm stuck. i do need help..someone to help …

Member Avatar for zandiago
0
112
Member Avatar for hectic

I have a header file : abc.h and abc.template file and i want to use the template feature, how can i modfiy following program to change it completely in template abc.h file have [code=cplusplus] #idndef d_h #define d_h # include header files - cstdlib, iostream and string namespace xyz { …

Member Avatar for vijayan121
0
501
Member Avatar for sagarvs

hello everyone, Am a btech student.Iam now doing a project of watermarking using dsp processor.for that ,the image processing is to be done in borland C and using code composer it shud be called to a dsp processor.so if anyone,can please help me to get program codes for accessing a …

Member Avatar for sagarvs
0
90
Member Avatar for syama.sasi

how can i get d output in foll format 1 2 3 4 5 4 3 2 1 1 2 3 4 4 3 2 1 1 2 3 3 2 1 1 2 2 1 1 1 1 2 3 3 2 1 1 2 3 4 4 3 …

Member Avatar for Narue
0
43
Member Avatar for makmak02

I'm making a code that will add the squares of a range, ie input number is 4,the squares of 1+ square of 2+square of 3+square of 4 (1+4+9+16)= 30. In my code I'm using the caret symbol for the square but it just multiply the number by 2 and not …

Member Avatar for Ancient Dragon
0
141
Member Avatar for niki01

Hi, I need help with Round Robin algorithm. I don't understand how to implement the process.

Member Avatar for Killer_Typo
0
153
Member Avatar for winky

Newbie C++ programmer here :) I'm supposed to bubble sort an array to where I can eventually print it ascending and descending in the correct order. I am, however, having trouble passing the parameters for the bubbleSort and printElements functions. I get the error: error C2664: 'bubbleSort' : cannot convert …

Member Avatar for Ancient Dragon
0
2K
Member Avatar for shizu

Hi, I am new here.. I faced a problem when I tried to call two difference software function.. I name this two software as App A and App B.. I had create App B's pointer at App A, name as BPointerAtA.. I try to new the pointer at App A …

Member Avatar for shizu
0
163
Member Avatar for rocky1821

Good day all, I've been working on this code for a for a while now and I can't seem to find what's wrong. I am supposed input two numbers and return if this is a twin prime number by just outputting true or false. My program compiles and runs but …

Member Avatar for Ancient Dragon
0
181
Member Avatar for cmoodc

hi all I need a help in my first h.w //write a function using opengl that draw a cube of size 50 pixels anyone can help me thanx

Member Avatar for Ancient Dragon
0
55
Member Avatar for j2swift

I am a beginner in C++ and I need some help because my decoding is coming out as a series of numbers. Here are the detail as to what I am trying to do. I wrote 2 programs that compress and decompress a text file, each taking input and out …

0
82
Member Avatar for DREAMER546

hey every one please can u help me .. i need this today [B]Write a C++ program to read numbers end with -1 then print the largest number[/B] i'm tring but always print to me the largest -1 that's wrong! :"( how can i fix this [CODE]#include <iostream> int main() …

Member Avatar for DREAMER546
0
108
Member Avatar for EnderW4785

I'm probably going about this all wrong, but I've written a piece of code that pops of a window, activates a DirectX device within the window, draws the mesh, paints on a texture and then allows me to move around the mesh with the arrow keys until I close the …

0
48
Member Avatar for makmak02

I'm trying to solve a problem that my friend gave me and i'm really stuck at it, I'm solving this now for about 1 whole day and my PC's about to melt. Im trying to figure out how to add numbers in a range i.e I input the number 6 …

Member Avatar for makmak02
0
87
Member Avatar for asilter

[code] #include <iostream> using namespace std; int main(int argc, char * argv[]) { hash<const char*> H; cout << "foo() ->" << H("foo()") << endl; } [/code] compilation error after g++ -c -g main.cc is : [code] main.cc: In function `int main(int, char**)': main.cc:8: error: `hash' undeclared (first use this function) …

Member Avatar for vijayan121
0
355
Member Avatar for Crouchinho

Guys, I have a question regarding the use of STL next permutation algorithm say I have a vector a[] = [ 52 3 4 2 49] How do I use the next_permutation algorithm for only the last 3 elements (in this case 4 2 and 49) and store those in …

Member Avatar for vijayan121
0
175
Member Avatar for cmoodc

this is my first thread i need a function in C+ that return 1000000*1000000 integer given by the user in reverse but without using arrays,lists,pointers,..... only i can use 2 or 3 variables thanx 4 help

Member Avatar for cmoodc
0
87
Member Avatar for geekychick

i wrote this function readBig. It's purpose is to scan a number from the user as a string and converts each element of the string into an int and stores it in an int array then reverses the elements so the ones position is in n[0] tens position is in …

Member Avatar for geekychick
0
144
Member Avatar for koolboy

hi all, i need help with writing a program for adding two random numbers. my output should look something like this: Enter a number between 1 and 1 million: 6758 Enter another number between 1 and 1 million: 87698 376 + 486 _____ 862 Congratulations! (smiley face) You're pretty good! …

Member Avatar for jbennet
0
106
Member Avatar for hectic

i sloved the previous problem and got the new problem now, i have three file header file where i define the function prototype and the other implementaion file for the function body and other one is the test file which takes input for the implementation file i have a function …

Member Avatar for Narue
0
296
Member Avatar for winky

Hey guys :), Thanks for any help ahead of time. I'm writing a program that would take the input scores of seven judges and throw out the highest and the lowest. [code]#include<iostream> using namespace std; int main() { float a=0, b=0, c=0, d=0, e=0, f=0, g=0, score=0, difficulty=0; cout << …

Member Avatar for winky
0
104
Member Avatar for Dha_King

Hello sorry if i hijack this thread for my own purpose, first English isent my first language, my apologies for the misspelling and all. I also have problem with dynamic arrays, our stupied teacher made the assingment harder then he hade to. I'll try to explain the assingment. First we …

Member Avatar for Ancient Dragon
0
510
Member Avatar for C++Amanda

I am very new to C++. I have to write a program for class that reflects the game of craps and I'm kinda stuck at this point. Any help someone could give me would be HUGELY appreciated. The guidelines we were given are that the program should execute 10000 times …

Member Avatar for iamthwee
0
194
Member Avatar for fXp17

I want a user to be able to enter 5 numbers and I want the maximum number to be displayed (and it must tell the user whether this is the 1st number, 2nd number, 3rd number (etc..) that was entered) Example: 15 45 3 79 20 The maximum number is …

Member Avatar for Narue
0
98
Member Avatar for npkinh

Hi All, I would like to know the list of domain name which registered in the internet, but I dont know how to do that. Please help me! Thanks,

Member Avatar for Ancient Dragon
0
67
Member Avatar for eranga262154

I'll explain my issue in this way. I've use a structure to get some data of a byte stream as follows. [CODE] 1. struct pac_cont 2. { 3. unsigned int des_list ; 4. unsigned int mem_ID ; 5. unsigned char dm_con ; 6. unsigned char ser_ID ; 7. unsigned short …

Member Avatar for eranga262154
0
1K
Member Avatar for gaasha

I want my SDI app to return the entered-text to the caller app (which called it using ShellExecute() function). The only way that seems feasible to me is via clipboard. Now SDI app writes the entered text to the clipboard when its "Close" button is pressed. I intend to show …

Member Avatar for gaasha
0
84

The End.