49,761 Topics
| |
Hi, Merry cristmas and Happy new year to everyone. I am writing this because i am having problems with my compiler Borland C++ Builder 6 Evaluation Version :-( The problem is that after I have designed a GUI program, Build it and run the executable, Windows declares a Stack Overflow. … | |
[B]why is this keep giving me same 2 numbers?[/B] [code=cplusplus] #include <iostream> #include <iomanip> #include <ctime> #include <cstdlib> #include <windows.h> using namespace std; int generate(int,int); int _tmain(int argc, _TCHAR* argv[]) { int random[1000]; for(int n=0;n<1000;n++) { random[n]=generate(1,50); cout << random[n] << endl; } system("pause"); return 0; } int generate(int min, … | |
I use this code in a multilined textBox event handler. When writing: "hellowalker" in the textBox:s first line, "walker" turns blue. If you delete this and go down a line and write the same: "owalker" turns blue and down a line again "lowalker" turns blue. What could be wrong with … | |
I have done most of languages, I did arrays[] to all of them and of cause except COBOL, I can declare them(arrayz[]) yes that one is easy, but manipulating them thats where the problem starts, I never get any program right if I have to use arrays, Im not gona … | |
i am working with a matrix manipulation program...consists of a matrix class and its member functions.. i have also overloaded << and >>...so dat dey can read and print d whole matrix at one statement.. the code of these overloaded operators is something like this.. [CODE] // for >> (cin) … | |
Hello! Trying to use regexp in glib but I cannot get it to work. I would like to have a regular expression to describe: [2003-03-11 13:14:12.111] letters letters.:1234 Hello I have tryed the following expression in 'regular expression testers' and there this works: ^\[\d{4}\-\d{2}\-\d{2}\s\d{2}\:\d{2}\:\d{2}\.\d{3}\]\s\w*\s*\w*\.+\w*\:\d{4}\sHello But not with glib's regexp. Why … | |
I want to display an image right after the dialog is drawn and keep it for like 3 secs (an intro). I know how to do everything but i can't find a message that is sent when the MFC dialog is displayed, "NOT" about to display. I can show messages … | |
how can i make the program print stars instead of typed letters. like password. for example enter the username: mike enter the password: **** **** = 1234 mike will go to a username variable and 1234 will go into password variable thanks | |
On C++ we have two different types of function which are non-returning value or void function and returning value function and what I would like to know under which condition you use either of those functions, and when do you know that you have to pass by reference(ByRef) or by … | |
Hi, Suppose I have a character array array1[]={A,B,B,B,A,A}. Now I want to declare a structure with a pointer in it and make each array1 element point to the previous element.For example last array1 element 'A' will point to the previous 'A' which will point to 'B' and so on. Can … | |
I'm trying to use composition. I included the header file and made a type of the class that is contained within the owner class but I keep getting errors like this: [QUOTE]c:\documents and settings\cheryl\desktop\parking lot system\person.cpp(7) : error C2614: 'PERSON' : illegal member initialization: 'DATE' is not a base or … | |
Hello i am using AES to encrypt/decrypt data/ pixel values.. saved in a file myfile.txt and the AES encrypts tha data and writes the ciphertext in a file ciphertext.txt When decrypting the data i am getting some of the pixel values decrypted correctly followed by garbage.. Code to open myfile.txt … | |
I have a base class name Elec, and 3 derived class.....capacitor, resistor, and series_circuits. I also used composition on class series_circuit to use capacitor and resistor object. In series circuit, i have declare an elec pointer to object.....Elec* *component. in the implementation, somewhere i wrote down component=new Elec*[10];..in another method, … | |
I am not able to figure out how to calculate the determinant of a matrix whose size and elements are to be taken from user. Could someone help me !! | |
Alright, so I'm having some trouble with ye olde factorials. "bool C++ beginner=true", folks. I'm struggling with this here problemo. Here's the formula I need to compute : C(n,k) = n!/k!(n-k)! And I have no idea how to go about this. First, I have to implement a function for the … | |
I followed the book to finish this 2 node linked list, and however it looks like there is only one node in it. (temp has replaced the head???? my book example coded this way which i don't fully understand) Is anything wrong in here? And i think my output function … | |
hi, I have a XML in a String coming from an external input. The problem is that this string is getting some junk characters appended to in the last. I need to find the lenght of the string only till the correct part. once i get this lenght i can … | |
This code tells what position the cursor is in a textbox. Let us say that this position is 10. Now is my question, is it possible to know what character it is if any on position 9 in the textBox. Is it possible to put the character on position 9 … | |
Hi all, I've recently had some issues with the streaming operator and the order of precedence used when mixing it with the member function operator (operator .) Example code is below. [code=cpp] #include <iostream> #include <vector> using namespace std; class A { public: A() : i(0) {}; int f() { … | |
Hi,I am implementing graph ,all function works except the Hamiltonian part(1 function and 2 private method).Every time i compile,it shows two error message,,i don't know how to use adjacency list or is there any way to implement it using the class declaration as given above...I have main problem on my … | |
Is it possible to [COLOR="Red"]get [/COLOR]the cursor position in any way in a textBox and also [COLOR="Red"]set [/COLOR]a Cursorpositon. I have tried out this syntax but am not sure if this is correct: I dont know what this returns. [code] textBox1->Cursor->Position::[COLOR="Red"]get[/COLOR](); textBox1->Cursor->Position::[COLOR="Red"]set[/COLOR](); [/code] | |
Hey guys, I have a problem. When I try to run a program that I've compiled with VS 2005 on a different machine that does not have VS, I get this error. "The application failed to initialize properly (0x0150002). Click on OK to terminate the application." I've installed the Microsoft … | |
I'm getting pretty bored with the straight-forward database work we're learning in school. I've got very solid understanding of intermediate C++ concepts, but we have yet to implement any graphics! When I was a lot younger I mastered QBasic (which isn't much of a feat) so I should have a … | |
If I have a textBox that contains this information below wich meens 2 lines. What I am trying to do is to search this textBox with a while loop for the word: "five" and when found this word, I wonder if this word has any kind of substringindex where I … | |
I am implementing code to program a hangman game in C++ for my CSP class. So far, I am working on the random string function as well as calling the body parts as void functions. I am attempting to compile what I have as of now to see how it … | |
Need to be informed on how to code and also how my coding should follow.If possible need to be shown with an example of how to code.Ihave never done this so please assist me. | |
Dear all, I need to find the max width of Binary Search Tree. It means the biggest number of nodes in a level among all levels. [URL=http://www.imgloadtr.com/#aca41035095c6695489f975721df328a.jpg][IMG]http://www.imgloadtr.com/pics/aca41035095c6695489f975721df328a.jpg[/IMG][/URL] In the figure the maximum width is 4, since level 3 has the biggest number of nodes, which is 4. I will be … | |
i seem to have messed up on the out put some how [code] #include<iostream> #include<cmath> using namespace std; char ans[16]= {'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'}; int digit2value(char); char value2digit(int); int conversion(int, int, int); int reversing(int p[],int i); int main(){ int radixa,radixb,number; cout<<"radix a(10) ";// i am going to changing program cin>>radixa; // after i … | |
Hey - sorry if this is the wrong place for this. I have this basic chess game I'm making, and I'm done with the first alpha build of it. It works fine when I compile it on my own computer, but when I bring the exe to a different computer, … | |
I have a wondering that if I write a specific word in a textBox in C++ .NET like for example the word: "Name" What I wonder here is that when writing this word it will turn to the color of blue when the word is written. So if there is … |
The End.