49,761 Topics
| |
Hi there, I'm trying to implement SoRayPickAction that will, when the mouse is clicked, select a particular node so then I can translate, rotate, etc. I have three nodes: desk, lamp, and frame (picture frame). However, I don't think that my code is at all right. I also have various … | |
I have been messing around with making a windows application in Dev-C++ I wanted to make it in a single source file, rather than a project to see if it worked. It did, other than the fact that I got the windows app, AND a DOS prompt behind it. Is … | |
Hi Its been about a year since I've been on this site, Back when I use to use XP for my operating system and Dev-C++ for my compiler. But Now I have WIndows 8 and I tried downloading Dev-C++ but I kept getting this message. "g++.exe has stopped working." So … | |
I'M working my way through the book "C++ without fear by Brian Overland" and there are two small programs with to totally different types of type casting and the book fails to explain the difference, please help me understand. Thanks. The first one is on a while loop and the … | |
I need help in deleting all the leaf nodes in BST void BinarySearchTree::removeLeaves() { removeleaf(root); } void BinarySearchTree::removeleaf(tree_node* p) { if(p != NULL) { if(p->left) removeleaf(p->left); if(p->right) removeleaf(p->right); delete p; } else return; } can someone check my code. pls | |
I have this function: void read(){ int id; string desc; string title, type; cout<<"Movie's id: "; cin>>id; cout<<"Movie's title: "; cin>>title; cout<<"Movie's description: "; getline(cin, desc, '\n'); cout<<"Movie's type: "; cin>>type; cout<<"You have typed in: " <<id <<" " <<title <<" " <<desc <<" " <<type <<".\n"; } and my … | |
Hey Everyone, I have run into a bit of a problem with regards to application startup... I have written a C++ application with QT libraries that uses active QT to communicate with our ERP system in our business, the requirements are that any application we use needs to communicate its … | |
I'M trying to compile a very small cout<< console application in MSC C++ but the program flashes up and goes away so quick that I can't see anything that's going on. Below are my headings, what's missing? Thanks. #include <Stdafx.h> #include <iostream> using namespace std; | |
I have been researching ways to make a DOS window disappear when starting a program. I have solved this, by using getconsolewindow() and setwindow(). The thing is, I still get a blip where the DOS appears for a couple miliseconds. Is there a way to fix that? Clip of code: … | |
I'm having some trouble making my snake move :D I can move one point in any direction but the whole body of the snake is where I'm confused , if(a == (char) 119 || a == (char) 87 || a == 72) { y=y--; gotoxy(x,y); PrintVector(v); } thats works just … | |
Hi I am getting this error when running a very similar code like the below. I have memory problem,but i dont know how can solve it. please help. Thanks in advance. /////////////////////////////////////////// ~~~~~~~ERROR~~~~~~~~ terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc Aborted /////////////////////////////////////////// ~~~~~~~~Code~~~~~~~~~ int main(){ /** Declare … | |
please help me coding this in c++: ï‚· Inverse matrices. ï‚· Calculate matrix determinant. ï‚· Set a row or a column of the matrix to a certain value. ï‚· Calculate performance (time and memory taken by each algorithm). | |
i have read a txt file into queue just like below example which is i can do it.. the problem is i how to read Tab Delimited Files which i want file size to multiple by 0.6... because i want to create handle a printer simulation using queue...sorry for my … | |
I have read a file with around 120k words so i try to do it fast. have seen the: int x = setvbuf(fp, (char *)NULL, _IOFBF, BSZ); assert( x == 0 && fp != NULL ); option but it takes more than a second ( 1 mb file) so now … | |
In Python: #python class myClass: istat = 111 #exists as soon as import class def __init__(self): print("in ctor") self.iauto = 222 #does not exist until instance created ..... mc1 = myClass() mc2 = myClass() In C++: //C++ class myClass { public: static int istat; int iauto; }; ..... //main myClass … | |
I cant display this output..how i can i declare the gender n relate it with my price..i stuck here..oop c++ i have 2 coding for this..which 1 is better..im new in this progrmmer.. void eSalon::priceCurling() { cout<<"\nYour Gender is: "<<gender; if (gender=female) { cout<<"Long Hair Rm30-RM49"<<endl; cout<<"Short Hair RM50-RM100"<<endl; } … | |
Hi all, I have to make a project on my School until 18th of May. I am using resEdit to make graphics for a c++ program. But there ara a lot of cases that the program crashes. Could you help me ? I don't know to use resEdit good so … | |
I am using visual studio 2010. I wanted to compile my cpp from cmd. I can compile it using "cl file.cpp" comand in visual studio developer command line tool. But I wanted to compile it from the built in cmd of windows. When I try to use the command "cl … | |
I am familiar with loops, functions, recursions, (though I have praticed some questions, it is troubling to get the hang of it completely), passing by value, reference and ofcourse pointers. I can work with arrays and 2d arrays. This is my second project. My first project was hangman. My sir … | |
Please Help!!! My understanding of getopt is very limited. I do however realise that argv[0] is the exe file, argv[1] is the option, argv[2] is the word to compare and argv[3] is the dictionary or document I want to search(file .txt). I'm trying to set a pointer to the dictionary … | |
Hello all. I have come to the conclusion that when i try to use images for backgrounds in my windows forms, these images have to be exactly the same size as the form or else when i move the form it will cause the form to shake. The problem with … | |
I want to start developing an IDE or at least a Syntax highlighter into my program. Atm it's a simple text editor with basic copy paste functions. How does Notepad++ do it? Is there a way I can integrate that into my own program? If not then I'll write it … | |
#ifndef FILM_H #define FILM_H #include <QString> class Film { protected: QString title; double dailyRate; public: Film(QString ti,double dr); QString getTitle() const; virtual double calculateRental(int num)const; }; class Video: public Film { public: Video(QString ti,double dr,QString vt,int d); QString getTitle() const; QString getVideoType() const; virtual double calculateRental(int num)const; protected: QString videoType; … | |
have fun with this game o' keno! post here with your highest winnings | |
I used to use a tutorial for windows console API, but the website was taken down :(. So now I need to ask how to do these things (which ALL were included on the website) in the console with windows API: * Mouse events (clicks and unclicks) * Cursor seeking … | |
Please write a program that will asks to give an integer number K that will be higher than 20. If the number is not higher than 20 then make the program to show a relevant message and then ask to insert again the number K. After that, depending on the … | |
Write a program for an application that does not tolerate erroneous input data. Therefore, the data values are prepared by entering them twice by the user. Two lists are made by getting positive integers from the user, separated by a negative number. These two lists of numbers should be identical; … | |
I just downloaded netbeans and when I went to start a C++ project I was told that Netbeans couldn't find a C++ compiler. When I use to play around witt MS Visual C++ I never ran into a problem like this, Can anyone tell me what's up and what I … | |
please am new into programming and i was given a project to create a premier league table using C can any 1 help me thanks a lot | |
Hi ive made a code does the following: 1. user makes a list of items 2. user adds more items to the list 3. list is displayed it uses Linked-Lists. here is the code #include <iostream> using namespace std; struct vote { char product[10]; vote *votePtr; }; void addNodes(vote *&startPtr,vote … |
The End.