49,761 Topics

Member Avatar for
Member Avatar for dark_sider_1

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 …

Member Avatar for dark_sider_1
0
153
Member Avatar for iismitch55

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 …

Member Avatar for adityatandon
1
11K
Member Avatar for theashman88

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 …

Member Avatar for adityatandon
0
613
Member Avatar for lewashby

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 …

Member Avatar for adityatandon
0
146
Member Avatar for em_jay

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

Member Avatar for shroog
0
1K
Member Avatar for Lucaci Andrew

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 …

Member Avatar for Lucaci Andrew
0
277
Member Avatar for Eagletalon

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 …

Member Avatar for Lucaci Andrew
0
1K
Member Avatar for lewashby

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;

Member Avatar for Nick Evan
0
246
Member Avatar for iismitch55

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: …

Member Avatar for iismitch55
0
926
Member Avatar for PeTo.

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 …

Member Avatar for PeTo.
0
2K
Member Avatar for rahim_fayaz

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 …

Member Avatar for rahim_fayaz
0
139
Member Avatar for samar11

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).

Member Avatar for samar11
0
165
Member Avatar for PuQimX

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 …

Member Avatar for PuQimX
0
158
Member Avatar for Despairy

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 …

Member Avatar for Despairy
0
283
Member Avatar for drichird

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 …

Member Avatar for Gribouillis
0
803
Member Avatar for Miz_LiLO

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; } …

Member Avatar for ravenous
0
117
Member Avatar for bufospro

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 …

0
80
Member Avatar for eagle_phoenix2

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 …

Member Avatar for eagle_phoenix2
0
690
Member Avatar for khuzdaar

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 …

Member Avatar for khuzdaar
0
515
Member Avatar for anonymous1987

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 …

Member Avatar for ravenous
0
315
Member Avatar for jonnyboy12

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 …

Member Avatar for jonnyboy12
0
153
Member Avatar for triumphost

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 …

Member Avatar for mike_2000_17
0
1K
Member Avatar for annitaz

#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; …

Member Avatar for annitaz
0
231
Member Avatar for Clinton Portis
Member Avatar for Nick Evan
0
159
Member Avatar for Labdabeta

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 …

Member Avatar for Labdabeta
0
194
Member Avatar for deppy

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 …

Member Avatar for deppy
0
210
Member Avatar for rafaquatbutt

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; …

Member Avatar for Ancient Dragon
0
74
Member Avatar for lewashby

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 …

Member Avatar for lewashby
0
148
Member Avatar for sesan2007

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

Member Avatar for nitinmbhanu
0
212
Member Avatar for BryantFury

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 …

Member Avatar for BryantFury
0
250

The End.