51,593 Topics

Member Avatar for
Member Avatar for zandiago

The assignment is : Write a C++ program that calculates the volume of 3 different geometric shapes. Your program should give the user a menu like the following and repeat until the user wants to stop. Volume Calculation Program Select the Number of Your Chosen Object 1. Dumbbell 2. Axle …

Member Avatar for zandiago
0
195
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
72
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
154
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
161
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
114
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
510
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
93
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
146
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
157
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
165
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
185
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
59
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
83
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
113
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 GRaymer

I'm a student working on an internship, without a lot of guidence. I went to develop a program with C# not realizing that as a developer in the organization I have a different standard desktop than the rest of the organization. So on my computer I was able to develop …

Member Avatar for GRaymer
0
104
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
90
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
361
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
89
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
147
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
113
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
300
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
108
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
512
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
197
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
99
Member Avatar for bodikon

So on my desk, i have nothing but a computer running Windows XP SP2. I want to connect a usb connector into my computer, into a component board with an LED. Then I want to create a program in C# command line that I can turn the light on and …

Member Avatar for Ramy Mahrous
0
113
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
68
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
89
Member Avatar for ocean001

hi all, currently i am trying to make my mobile dialog/interface to retrive data from my database(ODBC), but i am not too sure about that, can anyone kindly advice me on that. thanks

Member Avatar for ocean001
0
110
Member Avatar for gator6688

Ok I figured everthing out except: 1) when it asks for my input it asks like this Enter first name: Enter last name: Enter amount:-it puts it all on the same line. Also when I run it it puts Sept. on the in the right spot but it puts 30, …

Member Avatar for Salem
0
129
Member Avatar for cardanadam

[CODE] #include <iostream> using std::cout; using std::cin; int Forla_ciz(int); int While_ile_ciz(int); int DoWhile_ile_ciz(int); void main() { int genislik,no; while ( (genislik<1) || (genislik>22) ) { cout<<"0 ile 22 arasında bir geniÅŸlik girin:"; cin>>genislik; } while ((no<1)||(no>3)) { cout<<"hangi fonksiyonu kullanarak cizmek istiyorsunuz?\n" <<"(1)for ile (2) while ile (3) do/while ile"; …

Member Avatar for jwenting
0
49
Member Avatar for cardanadam

[CODE]program produces a diamond enclosed by a square of the given size. For example, Enter an odd integer 9 ********* * * * * * * * * ** ** * * ** ** * * * * * * * * ********* [/CODE]

Member Avatar for jwenting
-1
70
Member Avatar for gator6688

I need to be able to pass the data I enter into my check. I do not think I have my check set up right though. I will post my code. [CODE]#include "stdafx.h" #include <iostream> #include <string> using namespace std; string todaysDate; string firstName; string lastName; double amount; void enterData(); …

Member Avatar for gator6688
0
120
Member Avatar for nhenson

I have been working on this problem since last week and I about to go insane. I got it working and then all of the sudden it got screwed up. I want to know if someone can help me find out what I am doing wrong to fix it again. …

Member Avatar for Ancient Dragon
0
93
Member Avatar for pacman326@gmail

Hi guys, I am suppose to write a program that accepts an account number, d or c standing for debit or credit, and a floating number representing the amount of the transaction, and then does 5 things. 1)Display the sum-total amount of all transactions for a particular account. 2)Display the …

Member Avatar for Ancient Dragon
0
103
Member Avatar for ThePhenom

I am hoping someone can help guide me in the right direction. I have a project for class that I am working on and I could use some help. The project guidelines are below as well as my code thus far. I have gotten this far with it but am …

Member Avatar for ThePhenom
0
136
Member Avatar for donuttier

Hello! Please help me!!! I have been trying to make a program that show details written on a csv file. Somehow I have managed to do so, by using a code for opening *txt files. However, I would also need to add details to the same csv file, and delete …

Member Avatar for donuttier
0
2K
Member Avatar for daniweb2013

Hi guys, i have one question, when i type using namespace std; at top of my program my compiler gives some error especially syntax error! my compiler is Borland C++ v.5 for example simple code: [code=c++] #include <stdio.h> #include <conio.h> #include <iostream.h> using namespace std; void main() { clrscr(); getch(); …

Member Avatar for n.aggel
0
2K
Member Avatar for horntastic

I am using Turbo C++ for Windows, version 3.1 at home. At school, we are using a similar version (maybe 3.0 or 3.1), but with a more blocky display. (with block cursor and stuff. my one at home looks more... modern) [EDIT] The school version is Turbo C++ 3.0, possible …

Member Avatar for horntastic
0
153
Member Avatar for veronicak5678

I am in a beginning programming class, and am having all these syntax errors that i can't fiugre out. Please help! [code] /#include <cstdio> //Header Files #include <iostream> #include <cmath> #include <cstdlib> using namespace std; int main(); int init_function(); enum choice {regular=1, super, superdooper,quit}; choice display_function(); int big_switch(); int calculate(int …

Member Avatar for Dave Sinkula
0
126
Member Avatar for wicked357

I need to read the 5 words from a input file mine is called words.txt I am unable to get to work correctly everytime I put inFile >> words[5]; instead of cin >> words[5]; I get a debug error and prog shuts down and nothing is showing up for errors …

Member Avatar for iamthwee
0
124
Member Avatar for jacques95

Hello i have put this into devshed #include <iostream> #include <string> using namespace std; int main () { string mystr; cout << "What's your name? "; getline (cin, mystr); cout << "Hello " << mystr << ".\n"; cout << "How old are you? "; getline (cin, mystr); cout << "I …

Member Avatar for JRM
0
96
Member Avatar for phasita

I would like to separate data in text file. For example A 35 160 B 25 145 C 40 130 the first column is name of member,the second column is age and the last one is weight. The problem is not only one space. There are many spaces between column. …

Member Avatar for Dave Sinkula
0
43
Member Avatar for revenge2

Hey could someone please tell me whats wrong with this? [CODE]#include <iostream> using namespace std; int main() { const int sunday =7; const int monday =1; const int tuesday=2; const int wednesday =3; const int thursday =4; const int friday =5; const int saturday =6; int choice; cout <<" enter …

Member Avatar for Ancient Dragon
0
165
Member Avatar for hectic

I try to use the getline function, it works in simple program and accepts the input from user but when i try to use inside the do while loop, it just escape the line and shows that there is null input. cin works fine, case 1: cl.append(Cb("abc",false)); cout << "text"; …

Member Avatar for vijayan121
0
294

The End.