49,767 Topics

Member Avatar for
Member Avatar for theUnspeakable

[code=cplusplus] #include <iostream> #include <string> using namespace std; int findNum () { int num; cout<<"You have 10 chances to guess the number that is generated by this program."<<endl; cout<<"All numbers generated are of positive integers"<<endl<<"Good Luck!!"; cout<<"Enter you guess "; cin>>num; return num; } string start (int guess) { int …

Member Avatar for Sky Diploma
0
93
Member Avatar for Fiume

So.... I"m trying to use MPI_Bcast because it seems like the easiest way to take a multidimensional array (the full program has a 3-d one all filled out) and make it available to every process. The code below, however, does not work... 'grid' holds nothing but 0s when accessed from …

Member Avatar for Fiume
0
180
Member Avatar for daviddoria

Right now this is my setup: I have these classes Point2 Point3 Vector2 Vector3 Ray2 Ray3 Both Point classes and both Vector are independent. Ray2 contains a Point2 and a Vector2 object, and Ray3 contains a Point3 and a Vector3 object. I have two questions. 1) Should I somehow just …

Member Avatar for Radical Edward
0
114
Member Avatar for niitian

hello everyone. i need a bit of help in this project of mine which is due in 2 weeks.. here's what needs to be done, but i have no idea about the logic:( if somebody can help me with the pseudocode or algorithm, i could write the code maself.. [B]Write …

Member Avatar for Nick Evan
0
159
Member Avatar for rpamballa

Can someone go through the following code whic generates shortest path for randomly generated processes. My code is generating a segmentation error when I run it, and I am unable to locate the bug. //This program implements the O(n) algorithm for finding shortest path for randomly generated processing times [code=cplusplus] …

Member Avatar for Cybulski
0
173
Member Avatar for Yourself

hi, I develloping an engine but I have an small error and can't find it... I want the user the say with icon he wants to use for his program : [CODE] WNDCLASSEX wndclass; // ... wndclass.hIcon = LoadIcon(m_hInstance,MAKEINTRESOURCE(GetIcon())); wndclass.hIconSm = LoadIcon(m_hInstance,MAKEINTRESOURCE(GetIconSmall())); // ... void SetIcon(WORD icon) { m_wIcon = …

Member Avatar for Yourself
0
345
Member Avatar for FTProtocol

main.cpp [CODE] #include <windows.h> #include "Resource.h" HWND hWnd; LRESULT CALLBACK DlgProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { DialogBox(hInstance, MAKEINTRESOURCE(IDD_Main), hWnd, reinterpret_cast<DLGPROC>(DlgProc)); return FALSE; } LRESULT CALLBACK DlgProc(HWND hWndDlg, UINT Msg, WPARAM wParam, LPARAM lParam) { HWND hwStart, hwServer, …

Member Avatar for FTProtocol
0
712
Member Avatar for kux

Hello, I have a CListCtrl and a button to modify the selected row in the CListCtrl. My problem is that my list has several columns and I want to be able to select a row by clicking on any column of the row that I want selected. Now I can …

Member Avatar for Aashath
0
1K
Member Avatar for Cybulski

I'm trying to call this function requested times. All functions and variables are members of one class, access is public. So, I'm calling like this: [code] void MultiReader::CreateThreads() { unsigned int nThreadNo; for( nThreadNo = 0; nThreadNo < vDirectories.size(); nThreadNo++) { CreateThread( NULL, 0, &MultiReader::ReaderThread, vDirectories.at(nThreadNo).sDirectoryName, 0, NULL); } } …

Member Avatar for Cybulski
0
877
Member Avatar for joshmo

I am studying stacks, queues, and heaps at the moment but i dont know how i can apply this in real life. Well my question is how can these may i say operations helpful and when are they really needed as opposed to others. I hope you can get my …

Member Avatar for Alex Edwards
0
140
Member Avatar for Aamit

I want to find server Ip. Server and clients are connected in Lan ..... how to do this??

0
57
Member Avatar for purepecha

//help please to solve this problem for multiple programs //with arrays. //The purpose of this program is to calculate the car charges //in a parking lot. this program is working for 1 car. //My assignment is to make a program that works for multiple cars //at the same time. //to …

Member Avatar for joshmo
-1
1K
Member Avatar for zoner7

I have a function inside another function that is called by main(). Inside the innermost function a vector is created, which I would like to return to the first function, which I would further like to return to main(). I suppose that I could create the vector in main and …

Member Avatar for zoner7
0
116
Member Avatar for zoner7

I am having a compiling issue because of some syntax errors while trying to return an array. You can probably ignore most of the code below; I am only concerned with the call and return of the CreateBoard[][] array. As I understand a pointer might be necessary to do this. …

Member Avatar for Ancient Dragon
0
108
Member Avatar for Pikachumanson

Hello everyone. This is my first post here. I am only posting here under the most extreme circumstances because I cannot for the life of me figure out how to make my save function for RPG game to work. So for it will only save in the first room. So …

Member Avatar for Pikachumanson
0
261
Member Avatar for cmatos15

I need help where it say /* write code to withdrawal money from account1 */.. i think the member function is written right but im not sure. Im a true begginer taking this online course and I think i have most of it right, can someone please help guide me.. …

Member Avatar for Ancient Dragon
0
138
Member Avatar for daviddoria

I have a function Scan.MakeLinearGrid() which returns a vector<vector<Vector3> > I have another function that is made to accept this type of thing: Scan.setAngleList(vector<vector<Vector3> >); But if I call it like this: [code] Scan.setAngleList(Scan.MakeLinearGrid()); [/code] it says [code] error: initial value of reference to non-const must be an lvalue Scan.setAngleList(Scan.MakeLinearGrid()); …

Member Avatar for Duoas
0
1K
Member Avatar for GallantAlex

Hi everyone, I am a just beginning Win32 Application Programming for C++. I really couldnt find any site that didnt confuse the heck out of me. Alrighty, I'm not here to ask you questions about acutally learning Win32, but i would like to know if you could recommned me a …

Member Avatar for William Hemsworth
0
486
Member Avatar for AceChandra

Need help! supposed to take in 6 project grades and 2 test grades... multiply each by %50 and add together for final average. however, i cant figure out how to add the integers in the array much less compute the average... any help is highly appreciated!!! heres the code: #include …

Member Avatar for William Hemsworth
0
175
Member Avatar for kpsmiling.4ever

Hello everyone, can anyone please suggest some problems (intermediate) which could be implemented in both C++ and java bringing me back on the track. i studied C++ 4 years back and java 2 years back. i was quite comfortable with the concepts and logic. but for now about 2 years, …

Member Avatar for William Hemsworth
0
124
Member Avatar for azualin

THIS IS MY QUESTION........PLEASE SOLVE IT........... Write a complete program to read 15 numbers type of integer and calculate the number of the same number. (Use : loop, array, function) Example: Please enter 15 numbers : 2 4 5 6 2 2 7 5 5 2 2 2 4 4 …

Member Avatar for Radical Edward
0
63
Member Avatar for chickenlord500

I am working on this code and everything is working but for some reason when i go and do case 3 for remove it removes the code but continually asks for me to remmove and no matter what i type it will not go back to default options for me …

Member Avatar for zoner7
0
195
Member Avatar for ice661666

Hi, I have been asked to write C++ program to calculate the factorial for numbers from 1 until 255, the problem is that no variable exist as far as I know that can handle the result for calculating 140! And greater “I am not sure about the number but it …

Member Avatar for tesuji
0
138
Member Avatar for Phan

I posted here about 2 weeks ago discussing what library I should use for my text based RPG game in c++ console development. I talked to my teacher about it, and he said that plagiarism was a huge concern, so I have to document nearly every aspect of my program …

Member Avatar for mitrmkar
0
131
Member Avatar for zourlas

Hi mates So i have a big project for my school...and the bad news are that i am a noob in C++.. In VCL enviroment i try to take an AnsiString Text from a listbox or EditBox and convert it into a integer array in order to do some calculatos …

Member Avatar for zourlas
0
185
Member Avatar for a3sheikh

please if yuo have graphics.h for microsoft visual.net 2003 c++ can you send it to me thanks

Member Avatar for Tigran
0
71
Member Avatar for Dannyo329

What i'm trying to do is, basically, link one C++ File, to another. For example, first i have a cpp file, like, main. And I want to have a part where the user chooses something then the other cpp file opens.

Member Avatar for mitrmkar
0
122
Member Avatar for n00b3

Hello, Sorry if this is a basic basic question. I am familiar with doing console projects, but I am trying to do a gui project and the rules just don't seem to be the same. I have two basic questions. 1) Why can I not include fstream and/or string headers …

Member Avatar for mitrmkar
0
161
Member Avatar for bookworm619

I supposed to make in memory linked list. I thought I did it perfectly. My teacher is kind of the teacher that won't teach you but let you figure it out.. I couldn't figure it out!!! I supposed to make one like this but to manipulated the list. I am …

Member Avatar for mitrmkar
0
417
Member Avatar for sniper29

i have here a code..... can anybody tell me how to:-O change the '*' to 'X' when a user will input his desired seat..... :( #include<iostream.h> #include<conio.h> #include<iomanip.h> int userInput(); int main() { clrscr(); int x,y; const int row= 12,seat= 5; char plane[row][seat]; cout<<"\t\tAirplane Seat Arrangement"<<endl; cout<<"\tA\tB\tC\tD\tE\tF"<<endl; {for (y=1;y<=13;y++) { …

Member Avatar for VernonDozier
-1
268

The End.