49,761 Topics
| |
So I need to be able to close a window when I open another window... Here is my code: [CODE]private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { Form2 ^form2 = gcnew Form2(); form2->Show(); Form1->Close(); }[/CODE] All this does is close both windows... If you guys could help out a noob to … | |
Hi guys, I have a little question. When I make a dialog in Visual C++ 2010, with the Dialog Editor, you can Drag and Drop buttons, Edits etc. I can also test my dialog. The buttons and edits look very nice, the Windows 7 style. However, when I compile my … | |
hey, i'm writing a piece of code and i got an error that i really don't understand. The code is below, but i had to post it all because i can't even understand the error, so i posted it all. The Error: [QUOTE]1>main.obj : error LNK2019: unresolved external symbol "int … | |
Write a program which analyzes a text file by counting the number of times each of the 26 letters in the alphabet occurs. You must use an array to keep track of the how many times each letter is seen in the text file. Uppercase and lowercase letters should be … | |
Hello people, Need help with this code here. This code suppose to print blocks of char assigned by user with certain rows and column also assigned by user. For some reason it is giving me error and i don't understand what the problem is Help will be greatly appreciated. Thanks! … | |
working on a project for school and can't seem to figure out the for loop for making a polygon in a windows form. We have a set code that we have to follow but the teacher hasn't covered anything for window forms. And I don't understand what is meant by … | |
Hello! I need some help with writing a binary tree class. There are two methods that I have no idea how to approach: 1) Finding the left-most leaf. Example: ...............A............ ............../.\........... .............B...C........... ............/..../\.......... ...........D....E..F........ .............../.............. ..............G.............. ............./.............. ............H.............. .........../.............. ..........I.............. In this case, "I" would be the left-most leaf. Now, … | |
Hello people, This is first time i am using this site to get help. Any way to the point, The code provided below suppose to make a blocks of squares with certain rows and column. All the field, rows and columns are controlled by user. User can also choose which … | |
Hi , I am trying to create a Map that will have vector as its key and an integer as value. Each vector will be a member of a particular structure. I am new to using maps. When i tried the code below: I am getting duplicate entries in the … | |
I keep getting the wrong answer...I have a homework problem I have been trying to understand but have resulted in a headached. Using the code shown below, select the correct output for an input of -1: [CODE] Input Number If Number < 0 Then Write “1” Else If Number ==0 … | |
Below are instructions of what is required of me and i have tried to write the program. can someone point to a right direction because i have confused myself in middle and i am stuck. Please help! Write an employee class to encapsulate a users name, wage and hours worked. … | |
Hi, The following code works fine: [code=c] // main.cpp #include "Dog.h" void details(Dog x){ cout << x.height << endl;} int main() { int h,w; vector<Dog> vect; cout << "Please enter 3 dogs measurements: "<< endl; for(int i=0; i<3; i++){ cout <<"\nInput height:" <<endl ; cin>> h; cout <<"Input weight:" <<endl … | |
This is a two-part problem. The first bit of code creates an array of struct, initializes the various bits, and then displays them using a pointer. [CODE]]#include <iostream> using namespace std; const int SIZE=30; const int bSIZE=3; void Initialize(struct Book*[], int size); struct Book {char title[SIZE], author[SIZE];}; int main() { … | |
I finished a program to convert from decimal to binary, octal and hexadecimal. Now I want to use that program as a jumping off point to show polymorphism in C++. I am just going to copy/paste the instructions I am working with so that I don't mess it up with … | |
[CODE] void DllInjection::injectCode() // should i turn all this into throws as well :/? { if ((processHandle = OpenProcess( PROCESS_CREATE_THREAD | PROCESS_QUERY_INFORMATION | PROCESS_VM_OPERATION | PROCESS_VM_WRITE | PROCESS_VM_READ,0,processID)) == NULL) { _InjectionStatus = CREATEHANDLE_ERROR; return; } if ((memoryAddress = VirtualAllocEx(processHandle,NULL,wcslen(dllName.c_str()),MEM_COMMIT,PAGE_READWRITE)) == NULL) // check third argument, it wouldn't let me … | |
Hello, I have been reading tutorials on c++ for a while, and made a few simple applications. Now I've started looking at win32, and while all the tutorials I've looked at are quite good, they miss out on some simple points. I know how to make a window, a menu, … | |
Im new to programming and i cant seem to be able to figure this question out: Write a c++ program that uses two functions, called simple_interest(float amount, int duration) and compound_interest(float amount, int duration), to compute interest on an investment. The program should take the name of client and initial … | |
can someone tell me how can i list all the .txt files of a directory or folder by a c++ program. please tell . i have tried void f_ListFile() { system("cls"); system("DIR /b D:\\*.txt"); getch(); } it is working for this but when it is something like this below void … | |
pls someone give me a c++ program to insert and delete an element from a linked list...i tried a lot but i am stuck.. | |
i want to make a OS and i need to link the c++ file. How i can make a .o file? | |
theoretically - when using unint16_t (unsigned integer of size 16) I have two arrays of these unsigned int and i am going to use [CODE]memcmp[/CODE] for example: [CODE] uint16_t a[ARRAYSIZE] = {0,1,2,3,4,5,6,7,8,9,10}; uint16_t b[ARRAYSIZE] = {0,1,2,3,4,5,6,7,8,9,10}; if (memcmp(a,b , sizeof(uint16_t) * 16) == 0) { return true; }else { return … | |
there are two scripts, first, square.h second square.cpp this test program is trying to calculate square and cube of the given number but i have a problem with cube function definition. [CODE] #include <iostream> #include <conio.h> using namespace std; class square { int x; public: void set_values (int); int erek … | |
i also need a rectangle, a triangle and an outline!!! wwHHHAAA! very new to C++ !!!! from Mapua Ins of tech...philippines :D i already have a fibonacci, ulam seq, .. i need a euclidean and fermat test too!!! help! | |
I was wondering. Is there a way to write something from one method in to a result file instead of outputting to screen? To describe a little better, in pseudocode: [CODE] #include <iostream> #include <fstream> using namespace std; class Inputoutput { private: ifstream fileOne; ofstream fileTwo; int i; //More variables … | |
Hi, I have to read a file up to a fixed size, how can I do that? Any help is appreciated. example: I have a huge text file and I want to read 1000 bits at a time. How can I achieve this? Thanks, | |
Prblem: Implement a base class Account and derived classes Savings and Checking. In the base class,supply member functions deposit(), withdraw(), and print() which prints out the ownerand balance. Create constructors that take a string (for the owner's name) and a double for the initialbalance. All methods should return void. I … | |
I've written a program that outputs text from a file as hex. And this works like a charm. But in the example in the assignment the output starts with: 000000 ...... 000010 ...... 000020 ...... And that part I haven't figured out how to do! Any pointers? Any links/tutorials I … | |
in the program i am creating a file with specific path.. file name is to be entered by user and then we have to create a file but the code is giving the error written after the code. void f_Createfile() { string dirpath; // stores final name for file with … | |
I need some help on what I'm working on right now I'm not asking for an answer maybe some help or a push in the right direction. Here is what I'm asked to do "Convert your program to run from an input file instead of console input." I'm suppose to … | |
I need to print a B-Tree of order 'n' so that the output is in FIFO order. I have no idea how to do this? Could anyone give me some pseudo-code? |
The End.