49,757 Topics

Member Avatar for
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
168
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
141
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
331
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
135
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
Member Avatar for tKc

have been working on a program that should output the values of an array from lowest to highest order, my program runs but its ouputing -1.#IND which is clearly not right. Im pretty sure im messing up somewhere when i call back to my my function with selectionSort(array, N) but …

Member Avatar for tKc
0
159
Member Avatar for dnambembe

Hi, I am writing a code that reads input from user to create a linked list database at the same, time it write the data received in to binary file. when I run the program is supposed to prompt the user to enter the data for ten time, however the …

Member Avatar for dnambembe
0
1K
Member Avatar for Obsidian_496

Hello. I've created a program which calculates points which belong to a specific graph, such as Archimedes spiral, Logarithmic spiral, Cardioid etc. The program generates an array with coordinates. Technically coordinates are polar, but I can convert them to cartesian by using polar() function. Question is - how do i …

Member Avatar for mike_2000_17
0
698
Member Avatar for anglwthnati2de

Hi guys. I am hoping for a little help with this. I am pretty new to programming and just can't seem to get things right yet. Here is my code. It returns like 40 errors. Way messed up eh? [CODE]#include <iostream> #include <string> using namespace std; class Date { public: …

Member Avatar for anglwthnati2de
0
193
Member Avatar for biju127

Whats wrong with this code. I can create the DAT file.Name and Grade is writing to the file perfectly. but the file contains ASCII values for RollNO and after Grade. [B]Output file:[/B] Name A ÈB [B]Program[/B]: #include<iostream.h> #include<conio.h> #include<fstream.h> #include<string.h> class stu { int rollno; char name[20]; char grade; float …

Member Avatar for biju127
0
214

The End.