49,761 Topics
| |
[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 … | |
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) { … | |
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 * … | |
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 … | |
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 { … | |
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 … | |
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 … | |
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 … | |
Hi, I need help with Round Robin algorithm. I don't understand how to implement the process. | |
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 … | |
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 … | |
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 … | |
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 | |
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 … | |
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() … | |
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 … | |
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 … | |
[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) … | |
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 … | |
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 | |
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 … | |
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! … | |
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 … | |
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 << … | |
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 … | |
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 … | |
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 … | |
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, | |
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 … | |
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 … |
The End.