49,766 Topics

Member Avatar for
Member Avatar for rannamaa

Im making a program in wich I need to monitore (import) a variable (number from an other program window every time the variable changes. There are very much other information in this window but I only want this number that is occuring at a sertain position in the window. How …

Member Avatar for triumphost
0
163
Member Avatar for cent91

hello everyone. i am at such a stage where i need to make a decision. i have gained enough basic programming skills withn c++ and now i want to start with something a little professional. i dont like web programming and i would love to do system programming or game …

Member Avatar for thines01
0
630
Member Avatar for Chuckleluck

Hello, I'm fairly new to programming, and I'm not exactly sure how to do line-rect collision detection. If it helps, I'm using SFML 2. Can someone explain to me how I would go about coding line-rect collision detection? Thanks in advance.

Member Avatar for adityatandon
0
233
Member Avatar for triumphost

Currently I use: DWORD ThreadProc(LPVOID lpParameter) { void (* function)() = (void (*)())lpParameter; function(); return 0; } void Threading(HANDLE &hThread, DWORD &ThreadID, void* FunctionToPass) { hThread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)ThreadProc, (void*)FunctionToPass, 0, &ThreadID); } And I want to call it like: Handle hThread; DWORD ThreadID; Threading(hThread, ThreadID, AnyFunctionHere); That way …

Member Avatar for mike_2000_17
0
454
Member Avatar for Suzie999

Whenever I create some small tool in c++ dll for use with another language, a new user always has to download the microsoft redistributable package and install it. Is there anyway to add the resources needed from the redist, to my dll? How even do you know what resources it …

Member Avatar for Suzie999
0
185
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
154
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
616
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
148
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
279
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
247
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
929
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
140
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
166
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
159
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
295
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
806
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
119
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
81
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
700
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
516
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
340
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
233
Member Avatar for Clinton Portis
Member Avatar for Nick Evan
0
162
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
199

The End.