49,761 Topics

Member Avatar for
Member Avatar for TSims11

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 …

Member Avatar for TSims11
0
274
Member Avatar for hiddepolen

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 …

Member Avatar for hiddepolen
0
186
Member Avatar for Vv IVIatthew vV

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 …

Member Avatar for Vv IVIatthew vV
0
311
Member Avatar for aznlitomik3

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 …

Member Avatar for SgtMe
0
127
Member Avatar for parth27987

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

Member Avatar for parth27987
0
209
Member Avatar for jayzeus12

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 …

Member Avatar for jayzeus12
0
176
Member Avatar for GeorgeObl

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

Member Avatar for GeorgeObl
0
142
Member Avatar for parth27987

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 …

Member Avatar for SgtMe
0
206
Member Avatar for arunapad

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 …

Member Avatar for arkoenig
0
333
Member Avatar for treger69

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 …

Member Avatar for Software guy
0
89
Member Avatar for Ineptprgrmr

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

Member Avatar for Ineptprgrmr
0
156
Member Avatar for oggiemc

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 …

Member Avatar for oggiemc
0
141
Member Avatar for knellgust

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() { …

Member Avatar for knellgust
0
79
Member Avatar for anthonys1mom

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 …

Member Avatar for anthonys1mom
0
760
Member Avatar for lochnessmonster

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

Member Avatar for thelamb
0
104
Member Avatar for micke

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

Member Avatar for hiddepolen
0
209
Member Avatar for deepfixa

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 …

Member Avatar for SgtMe
0
141
Member Avatar for malayasthana

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 …

Member Avatar for Ancient Dragon
0
122
Member Avatar for jasleen12345

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

Member Avatar for alaa sam
0
98
Member Avatar for vedel
Member Avatar for Ancient Dragon
0
159
Member Avatar for elsiekins

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 …

Member Avatar for Ancient Dragon
0
122
Member Avatar for burcin erek

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 …

Member Avatar for alaa sam
0
138
Member Avatar for mjco

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!

Member Avatar for peter_budo
0
41
Member Avatar for Tiny_trixer

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 …

Member Avatar for drkybelk
0
136
Member Avatar for keeda

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,

Member Avatar for chiwawa10
0
78
Member Avatar for qvyhnl

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 …

Member Avatar for chiwawa10
0
218
Member Avatar for Jaily

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 …

Member Avatar for Jaily
0
99
Member Avatar for malayasthana

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 …

Member Avatar for jonsca
0
130
Member Avatar for doggie123

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 …

Member Avatar for doggie123
0
92
Member Avatar for .:Pudge:.

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?

0
51

The End.