49,761 Topics
| |
**hello peeps and geeks, i am missing the MinSpanningTree function here.. any help please? need to fill up the function to get a) Minimum spanning tree cost for the graph b)Spanning tree path for the graph. E.g in matrix or adjancency list. ** #include <iostream> #include <ctime> // For time() … | |
What I'm trying to do is initialize a vector of objects, pass the vector to a function, then initialize a new object with a constructor. After setting the object members in the function, I add that object to the vector. The problem is the member functions aren't updating outside of … | |
I've implimented this snippet of code dijkstra_shortest_paths( g, name2v[tempName1], get(&VertexProperty::predecessor, g), get(&VertexProperty::distance, g), get(&EdgeProperty::weight, g), boost::identity_property_map(), // index-map std::less<double>(), // compare std::plus<double>(), // combine std::numeric_limits<double>::infinity(), // infinity 0.0, // zero do_nothing_dijkstra_visitor(), get(&VertexProperty::color, g)); to use dijkstra's on a map created from a text file, but I have no idea how … | |
Generic task: I am assigned to store student information in a binary search tree. I have a templated tree class, school class, and student class. The school class inherits from the tree class. The student class is on its own. Now, I want to encapsulate a student in a struct, … | |
Okay, so as ussual I'm having a lot of problems with a code and I need a lot of help along the way, but I'm just going to break it down into simple questions as I go. I am taking data from an input file that is a .txt that … | |
How can i write a C++ program which prompts the user to enter names of five countries , stores them in a 2D array,sorts them alphabetical order and prints them on screen. im unable to make it..plz help #include <iostream> using namespace std; int main() cout<<"Enter tha names of five … | |
Hi I have a little problem. I am having a project and i need to implement Dijkstra for a graph.So far it was ok but i have that problem when run it in g++ The code is where i think i have the error is here i think: if(!graph_list.at(start_Node->id)->path_list.empty()) { … | |
So, this is my coding, but when i insert data, i cannot update view / print input that i had inserted. And also, i had connect the database with NOTEPAD, but it does not appear. So, what is the problem? # include <iostream.h> # include <fstream.h> # include <iomanip.h> struct … | |
Hello dear, I'm playing a normal game called "Kal-Online" and am doing my own server and im looking for a coder who can help to code skills and some stuffs for me I'd like to find him/her out, King Regards, Sheba. | |
Hi folks, I have a problem... Der erste Ordner `./src` mit der main hat folgendes Makefile (automatisch erzeugt) include C:/IPG/hil/win32-4.0.5/include/MakeDefs APP_VER = "Car_Generic <insert.your.version.no>" APP_NAME = CarMaker.$(ARCH)$(EXE_EXT) #OPT_CFLAGS = -g -O1 LD_LIBS = $(CAR_LIB) $(EKF_LIB) $(CARMAKER_LIB) $(DRIVER_LIB) $(ROAD_LIB) $(TAME_LIB) OBJS = CM_Main.o CM_Vehicle.o User.o OBJS_xeno = IO.o $(OBJS_CANIOGEN) $(OBJS_CANIOGEN_USER) OBJS_linux … | |
I currently have a program that can take a text file and inport the data that I need (names or locations as well as the distances between them) and I need to take that data and for a graph in boost so that I can do one of three things, … | |
Please help me sir.. its my first .. how to instal OpenGL Library into MinGW .... i have tried but error code : #include <GL/gl.h> #include <GL/glut.h> void display() { glClear(GL_COLOR_BUFFER_BIT); glFlush(); } int main(int argc, char **argv) { glutInit(&argc, argv); glutInitWindowSize(512,512); glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB); glutCreateWindow("Test Program :: hello world"); … | |
Write a C++ program to check whether a triangle is valid or not, your program should have the following function: checktriangle(int,int,int) This function takes the three integer type variables as the angle of three sides. And perform the validity check for the triangle as follows: A triangle is valid if … | |
Hi, I am working on a project and I have to implement a graph and to look for the shortest path. As I read so far the best way is with Dijkstra's algorithm. I am trying to do it but i have some problem. Can you please help me with … | |
Guys this is the code in c++ of bubble sort but i don't how to show it's output in animation> what kind of project should i made in visual studio and what libraries should i use? please help me guys i really want your help. #include <windows.h> #include <stdio.h> #include … | |
i want code of Sorting techniques like insertion sort , merge sort , bubble sort , quick sort. i want their output in gui or in any animation form in any language like c , c# or java. can any one help me plz ?Any one sorting technique is ok. | |
so whenever i tried to compile it give me error 2816 ive never used dev c++ although i have used netbeans and i had to change control panel env options and put C:\cygwin\bin but now im using mingw cuz dev c++ came with it. so this is the compiler log … | |
My while loop should terminate when the user types 0 for employee number. Unfortunately when you press 0 the loops iterates at least once before terminating. I was under the impression that as soon as the sentinal value is triggered the loop would terminate immediately. Right now I run program … | |
the output should be... "1 2 3 5 6 7 8 9 Merry christmas" using for loop.. here's my code ! </ #include<stdio.h> #include<conio.h> main() { int x; for(x=0;x<9;x++){ printf("\n %d ",x); } getch(); } > | |
Hi, In below code snippet , can anyone let me know how to print the functor value output (3,4,5,6,7) without embedding add function in class. #include<iostream> #include<vector> #include<algorithm> using namespace std; void add ( int i) { i=i+2; } int main() { vector <int> vec ={1,2,3,4,5}; for_each(vec.begin(), vec.end(),add); for (auto … | |
Write down in C++ and OpenGL a code that is able to draw a polygon with the following vertex: {-0.6,-0.6; -0.6, 0.6; 0.6, 0.6; 0,6,-0.6) and rotate the polygon by 450 | |
when we overloading a function: what matters is only the argument list(inclued the types) or the return type too? i'm overloading the assigment operator, but seems that i can't use with diferent return types:( please someone explain to me | |
I'm trying to create a simple colored cube using vbo(well it actually a rectangle with z = 0). I am using glew & freeglut. Here my code. #include <GL/glew.h> #include <GL/glut.h> #include <stdio.h> const int g_width = 800; const int g_height = 800; #pragma comment(lib, "glew32.lib") static const GLsizeiptr PositionSize … | |
| I am not asking you to write a calculator for me , I am asking , what must I learn to be able to write this program or these kinds of programs ? I have some experience programming console applications using C++ , but I have absolutely no idea what … |
Hi fellows, My question is: Is It possible to work with GUI(Graphical User Interface) in C++? Or Is it not the ideal computer language for this? Thanks | |
Trying to write a program that accepts a file of passwords and tests it for certain requirements, those requirements being: Has at least one upper case letter, has at least one lower case letter, has at least two digits, has no special characters, and is between 8 and 15 letters. … | |
I listened to a 20 minute recorded phone call about a program called The Airplane (also called Pay It Forward). Once the recorded call is over, I can't find any more information on this program. Can someone please help me? I REALLY want to find this program and join it. … | |
Hi, I have a problem understanding what is going on in this code: #include <iostream> #include <omp.h> using namespace std; class A { public: A() { cout<<"A created"<<endl; }; ~A() { cout << "A destroyed" << endl; } void printA( void ) { cout<<"ok"<<endl; } }; int main() { A … | |
Hello people this is very urgent! i have to make a hotel management programme and submit by tommorow, i have made the programme but it got rejected cause i used calsses for the log in. Can u people please help me by telling me another way to write a password.. … |
The End.