49,761 Topics
| |
YO gUYS Please help me how to open a webpage in C++ | |
Hi coders,,, I have to find mean,mode and median of a 2-D array : 2 5 2 5 9 5 8 3 6 10 8 1 10 10 7 1 4 4 3 8 4 3 1 2 4 10 3 9 8 5 6 10 8 3 6 10 … | |
Hi guys.. I'm still going through C++, learning new stuffs. It is true that I have finished my C++ course two years ago. But, you all know C++ have too much things to learn! Anyway, I need help guys "kindly" how can I open a program/or any file using C++? … | |
| //**numHits and numHalfHits give incorrect values.I don't know why** #include "Mastermind-game.hpp" using namespace std; int main() { bool choice = false; cout << "This is a game of MASTERMIND v.0.1" << endl; while(1) { cout << "Enter 1 if you want to solve game for your self" << endl; cout … |
i'm trying to enter a string phrase and store its last word in an Array, if the word is palindrom then a message will showit | |
Hello all, I just want to make sure if my answer to this question is right or no. If no please help me solve it. Thanks in advance. Here is the problem: What is the output of the following psuedocode num1 = 5 num2 = 1 num3 = 4 aQueue.enqueue(num2) … | |
So, I was doing some doing some research for a program I'm working on and I stumbled upon the information that clang++ is a better alternative to g++ on Mac. I've been trying to use it because I can define that I want to use C++11, yet, the file output … | |
I am not sure why my program isn't writing to the text file. When I start the program it tells me that the file opens. Then I call the functions that are inherited from other classes and I would assume that it would write to the file and then display … | |
I am trying to implement a search algorithm,it needs a tree with four(NOTE n=4) nodes.Is the struct declaration correct for array of structure pointers??You see the main idea is start with the 'cur' node.Then take a new 'temp' node. Copy the contents of 'cur->state' into 'temp->state' then perform the 'res' … | |
I wrote a game using an array of structs to represent a 9x9 grid. Now I'm re-writing it as a class to '++ it up' a bit and to better understand classes. Part of the game used a seperate struct to keep track of selected board squares (to see if … | |
Hi! I have this code and getting this problem: undefined reference to 'vtable for Triangle'. Thanks for your help! #include<iostream> using namespace std; class Point { public: float x,y; Point(){} Point(float x,float y):x(x),y(y){}; Point operator=(Point &X); }; Point Point::operator=(Point &X) { this->x=X.x; this->y=X.y; return *this; } class Figure { public: … | |
Hi. i need some help with this game i want to simulate with c++ (with the graphics.h library). i want to make a replica of Pacman. i already built the map, but now i got stuck: #1. i don't know how can i avoid the walls/obstacles (i have a blurry … | |
list the entire database in c++, what is the size of each of the data type | |
Sorry if I sounds mad...I have a some knowledge in c++ programing language. But I have been wondering if I can learn assembly language so that I can play with my pc as I like by programing it, creating DOS like programs and so on...but in my research I came … | |
//please can someone explain the output 4 8 12,why is it so? Thanks int count = 0; do { for( int i = 0; i < 4; i++ ) count++; cout << count << ‘ ‘; } while ( count < 10 ); | |
hi all i am using debian and installed sudo apt-get install mesa-common-dev and found this problem moc_mainwindow.o -L/home/damb/Qt5.2.1/5.2.1/gcc/lib -lQt5Widgets -lQt5Gui -lQt5Core -lGL -lpthread /usr/bin/ld: cannot find -lGL collect2: error: ld returned 1 exit status make: *** [a] Error 1 20:41:04: The process "/usr/bin/make" exited with code 2. Error while building/deploying … | |
Hi all... Can somebody explain to me why this code only works when I uncomment a specific line. It's not a crazy precision timer or anything just messing around atm, but don't understand the behavior. #include <iostream> #include <string> #include <time.h> // clock_t, clock, CLOCKS_PER_SEC unsigned int timer(){ clock_t t; … | |
Question : In Bouboun University's Information Systems 3 arrays are used to store student details, 1. Stud_Names (array of strings) holds the name of 100 Students 2. Stud_Map (array of strings) hold the ids of the 100 students (whose details are stored in Stud_Name) 3. Stud_Marks_Mod1 (array of floats) holds … | |
I have to make a program that simulates a lottery. The program should have an array of 5 digits named winningdigits, a randomly generated number in the range of 0 through 9 for each element in the array. The program should ask the user to enter 5 digits and should … | |
#include <iostream> using namespace std; int *growArray (int* p_values, int cur_size); int main () { int next_element = 0; int size = 10; int *p_values = new int[ size ]; int val; cout << "Please enter a number: "; cin >> val; while ( val > 0 ) { if … | |
Hi. I'm having a problem accessing a function of an object which I put into a vector. When I try to read the vector at lines 503-506 , I get an output of whatever number I set my setTau() function, instead of the correct number. The beginning value for the … | |
Hello guys :) I hope you are well. I have a problem, I am trying to build a 2D platformer and I am stuck when it comes to building the levels. I found a tutorial on how to build a tiling engine and I just got completely confussed. I am … | |
When I try to compile my code in visual basic 2010 it gives me the error 1903 and when I compile the code in Code::Blocks it opens the standard template library's algorithm.h file and takes me to line 2163 if (*__i < *__first) I don't want to modify anything here, … | |
I have developed an MDI MFC image viewer application for simultaneously viewing and comparing more than one images. In my application I need to implement dual monitor support which can view the displaying images in two monitors connected to the system and viewer should have provision to arrange the opened … | |
So i have a code for a menu and i am facing some problem.. code:- do { ch = getch(); switch(ch) { case 'W': case 'w': system("CLS"); cout<<" MOD v1.0\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"; cout << " --> PLAY\n\n"; cout<<" HELP\n\n"; cout<<" EXIT\n\n"; break; case 'E': case 'e': system("CLS"); cout<<" MOD v1.0\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"; cout << … | |
Question:write a function append that takes as input two queues Q1 and Q2, appends the content of Q2 to Q1 and returns Q1. The protoype of the function is: queue<float> append(queue<float> Q1, queue<float> Q2); My problem here im completly stuck i do not understand how to work it. here are … | |
've created this code to find Sqrt without math.h but gives me wrong values ! So what is wrong ?? #include <iostream.h> #include <conio.h> main() { double n,end,start=0,mid; cin>>n; end=n/2; while(start<end) { mid=(start+end)/2; if ((n-(mid*mid)<=0.001) && (n-(mid*mid)>=0)) {cout<<mid;break; } if(n>mid*mid) {start=mid+0.001 ; end=end;} if(n<mid*mid) {end=mid-0.001; start=start;} } getch(); } | |
Hello I am having trouble calling my addsomethingup() function. It keeps saying too few arguments in the function call. Can anyone let me know what I am doing wrong. I also can only get part of the output to work. I thought it was because of not calling the add … | |
Hello, Working with structures and C++. Our teacher in class attempted to show us how to over load an "<<" operator. I've tried to do that here in the program below without much luck. I have commented out some parts of the code while I am trying to debug this … | |
"MFC is not a language; it is a native (unmanaged) class library which is a thin wrapper around the Win32 API." now see these header function: void CMyAxUICtrl::OnDraw(CDC* pdc, const CRect& rcBounds, const CRect& /*rcInvalid*/) i belive the CMyAxUICtrl is the instance\object name but it's used outside of main function: … |
The End.