49,761 Topics
| |
OK, my code is very long. But this one is a little tricky so just bare with me here guys. What my program does is generate a text file with random numbers, for eg: 123 1234 12345 123456 And the program takes in that file and puts the random data … | |
Hi, I did a program which is dialog based application,in that i add listbox dynamically by deriving a class form CListBox class.and the list box is created in OnInitDialog() method.but when i add the listbox to the dialog using DDX_Control function it is failed to assert the listbox,because 3rd parameter … | |
Hi, I inherit the class called ListBox form CListBox and by using this class object I create a listbox containing two items in the listbox.when ever i select the item from the listbox the generated message should be handled by the control window by using WM_CONTROL_REFLECT mesage in ListBox message … | |
Below you will find a game I written in my spare time from college. Any and all critique welcome. I plan to expand this to a console RPG later, and eventually GUI. All in C++. BTW, nice forums. //============================================================================ // Name : Monster Shot.cpp // Author : Dave T // … | |
hello I have the following program in which i am tring to copy one strct array to another so that i can sort the second struct array without messing up the original one so i do the copy but when i run the program it give the following error : … | |
Im trying to write a program that simply takes a string input and reverses it. I want the program to repeat itself by asking the user then starting over. The problem im having is that when the program first runs, the getline function works correctly but then after the program … | |
My B+ tree looks like : rest of tree / 9 10 / \ \ 5 9 10 If I need to delete 5, I can't simply remove it because the page wouldn't contain any elements after that. So, I decide to merge with the right sibling. I don't understand … | |
Hi all, I need to make a windows application nothing fancy - just simple menu etc. However, I also need to be able to draw pixel colors to the screen (perhaps load from a bitmap image). It must be as fast and efficient as possible - and if possible, easy … | |
**What I would like to do:** - Read data from text file - Display data from text file - Add new data to text file - Save new data to text file **The file format used is as follows:** Number of items in text file (3) Name 1 Number 1 … | |
Hello I need to read 50 intergers from a text file and put them into an array. and output or show the user the numbers. for example: 23 73 58 49 34..... I need them to go into my array. I tried this code but it just outputs -850993. Heres … | |
I read [here](http://www.google.co.in/url?sa=t&rct=j&q=can%20have%20any%20(odd)%20b%20tree&source=web&cd=1&ved=0CDAQFjAA&url=http%3A%2F%2Fwww.cs.uga.edu%2F~eileen%2F2720%2FNotes%2FBtrees.ppt&ei=PcK3UPy4IcbYrQe7-oC4Cw&usg=AFQjCNFC0kjGfN16J-I0S5o3HEjBUxmpKg&cad=rja) that an m-way B-Tree can have m only odd. Is that really true? I've used 2,4 trees that allow a maximum of 4 child linkages for each node (and a minimum of 2). Isn't this a 4-way B-Tree? | |
how/where to initialize a static private std::list member ? | |
**my code should check if the Entered string is a palindrome or not** // stack.h typedef char comp; struct nodetype; typedef nodetype* nodeptr; class stack{ public: stack(); bool isfull()const; bool isempty()const; void push(comp elm); void pop(comp& elm); ~stack(); private: nodeptr top; }; /******************************************** stack.cpp */ #include<iostream> #include"stack.h" #include<cstddef> #include<cstdlib> #include<cstring> … | |
So Im creating Simple Binary Tree, not BST. Im having problem in deletewith 2 child. Method for deletion is DELETE WITH COPYING. After deleteing, when I traverse the tree, it shows run time error, **Unhandled exception at 0x008B5853 in binarytree.exe: 0xC0000005: Access violation reading location 0xFEEEFEEE.** Here is the function: … | |
Hi, I am new to windows forms. I used the 2 lines of code below to launch a c++ code from a windows forms GUI and it worked: Dim lngReturn As Long lngReturn = Shell("c:\MyProgams\cfile.exe", vbNormalFocus) I hope someone can help with the issue below: My interface includes some text … | |
Ok, so currently I've been trying to recreate missile command, an old atari game. While I've had help from a group in creating the graphics for the game i.e menu, plotter class, etc. I've basically been flying solo as of the game's logic i.e missile detection, health, missiles spawning and … | |
Hi again everyone. This is going to sound really dumb but I have to ask it because I'm not very advanced at C++. If I have a function such as **Funct(int *arg1, int *arg2)** , how do I use this function in a program. Can I just enter the values … | |
Hey guys, first post. I am at the end of the semester and running ito some trouble. I know this question has been askd a few months ago but I looked at the code that was supplied and it didnt work. I cant get it started, I think i can … | |
Hello Friends, I want to write plug in in c++. I am using windows 2008 in which i choose project of Extensibility type and use C++ Atl language.I didnt find any link in the net regarding this.only theoretical help is given there. Please help me with some example so that … | |
Hiya! I got rotating bitmaps working in my game using al_draw_rotated_bitmap(); Then i put animations in using al_draw_bitmap_region(); Ive found that i can either do one or the other. But i want it to animate and rotate. After looking at the allegro source to see what other functions are available … | |
My name is Leonard E. Norwood Jr. I'm just practicing a simple bubblesort program but this time using classes and pointers with operators >> and << and also an overloaded operator =. I'm merely trying to sort a list of numbers from lowest to highest. And the purpose of the … | |
Hi all, Am building a WinAPI project in Code::blocks and MinGW. I Downloaded some opensource source code, and tried to compile the snippet haveing done nothing to it, and I get *Syntax Error on line 6* for the following code: IDR_MENU MENU DISCARDABLE {//BEGIN POPUP "File" {//BEGIN MENUITEM "New", IDM_NEW … | |
Hi there, I'm a Visual Basic novice and have written a very simple GUI which I want to use to run a c++ program. I'm wondering how I would write the button click event to call the C++ program? I assume there's probably a simple way to do this but … | |
Hey guys, so I'm trying to make a Paper, scissors, rock program (where you play against the computer). And i got pretty far, to the point where it seemed finished. But then i realized that i need to make the program exit itself after the player wins three times. So … | |
Hello again.I recently have been doing a assignment which asks us to write a function to check whether a tree is perfectly balanced.I know the concept of Perfectly balanced tree but I just cant make out how to write this function.Any help in right direction will be highly welcome. | |
i read from a file okay for each line i save the respective data into their respective variables i output each variable to see if the data has really been saved.(is has) but when i try using the if condition to check the variable and perform a function it doesn't … | |
want to change all printf to cout with keeping the same output #include <iostream> using namespace std;Heading Here void main() { unsigned int a,b,c; char*format1 , *format2; format1 = "%04x%s%04x=%04x \n"; format2 = "%c%04x=%04x \n"; a = 0x0ff0; b = 0xf00; c=a>>4; printf (format1,a,">>",4,c); c=a&b; printf (format1,a,"&",b,c); c=a|b; printf (format1,a,"|",b,c); … | |
Hi there, Please check my program. When i compile it i am getting error. Cannot find default constructor to initialzie base class. #include <iostream.h> #include <conio.h> class Parent { protected: double num; public: Parent(double n) { num = n; } void sub() { num -= 2.0; cout << "num … | |
Hello I am really scratching my head around this ,i want to create a class function with more than one option Someathing like I don't really know for what to look for (basically a class whithin a class whithin a class and so on)... so i'll give an example: Events.add.coord(); … | |
Hello I am slowly learning more and more about C++ and more importantly programming technique and I have reached the wall that I am sure quite a few before me have probably hit - refrences/pointers and management of the heap. Whilst I try and familiarize myself with the above, I … |
The End.