49,761 Topics

Member Avatar for
Member Avatar for gretty

Hi, can you help me just write an algorithm (not coding) to solve to this task. I have to write a program that takes in 3 points on a graph & determines if they form a [B]right-angled triangle[/B]. More detail below. [B]Can you give me some advice on how to …

Member Avatar for siddhant3s
0
1K
Member Avatar for hypernova

I am doing B.Tech in computer science and I am in the 1st year (I have almost completed 1st year) I want to learn a language in the forthcoming summer break (2 months) between the first year and second year, and am quite confused if I should go for [U]C++ …

Member Avatar for Narue
0
144
Member Avatar for delifion

Hi, I got homework about tree data structure professor wrote his own tree stuff which are: binnode.h and bintree.h the actual file is tree.cpp binnode.h [code=c++] #ifndef BINNODE_H #define BINNODE_H #include <math.h> #include <iostream> /*******************************************************\ template node class for binary tree \********************************************************/ template <typename dataType> class binNode { private: dataType …

Member Avatar for delifion
0
136
Member Avatar for Xamas
Member Avatar for Peter_APIIT

Hello to all, i try to code the binary exponentiation algorithm but unfortunately it is not working as desire. I decided to switch back to You could try using std::numeric_limits<int>::digits to determine the values and sizes or using CHAR_BIT. My logic is define at below. Look at most significant set …

Member Avatar for Peter_APIIT
0
898
Member Avatar for luvsom

I've been struggling with this for days now...... Say the number entered is 12345 If the user wants to find the value of the 4th digit, which would be the 2....how can I do this???

Member Avatar for WaltP
0
127
Member Avatar for denis1401

What is the best way to do system wide user mode (NOT KERNEL MODE) api hook on Windows NT?

Member Avatar for MosaicFuneral
0
80
Member Avatar for tgsoon2002

As I read some tutorial, I just get the idea to input to the file totally replace, overwrite or continue at the end. I wonder any code that in put text in the middle like this brown || I want a V dog.

Member Avatar for tgsoon2002
0
262
Member Avatar for sabian4k

I know I don't have much done, but I am really stuck and my grade does ride on this. I have used this website to write my other problems please help. I know I have the inputof the intergers wrong. and the program is due tomorrow. please help! [code] //************************************************************** …

Member Avatar for tux4life
0
173
Member Avatar for blackhawk9876

I am having trouble writing these recursive functions. I know I am on the right track, but also know that these functions are not right. Any help would be appreciated. Given the following declarations for a linked list: [CODE]struct NodeType; struct NodeType { int info; NodeType* link; }; typedef NodeType* …

Member Avatar for siddhant3s
0
107
Member Avatar for kiwihaha

>main.cpp [CODE] #include <cstdlib> #include <iostream> using namespace std; #include "function.h" int main(int argc, char *argv[]) { struct AXEMAN{ int lvl; int att; int hp;}; struct DEFENDER{ int lvl; int att; int hp;}; struct ARCHER{ int lvl; int att; int hp;}; struct SPEARMAN{ int lvl; int att; int hp;}; struct …

Member Avatar for kiwihaha
0
149
Member Avatar for Liszt

I have a general question about how it would be possible to protect a software from copying. I have done a software that will be able to download from a website, the user will install the software on his/hers computer. How could it be possible to protect this software from …

Member Avatar for Liszt
0
99
Member Avatar for waehake

to start off thanks for the help in advance, im trying to make a program that calls a function that i input integers into, then calling another function to calculate the total of the numbers entered. here is my source code: [code=cplusplus] #include <cstdlib> #include <iostream> using namespace std; const …

Member Avatar for NathanOliver
0
111
Member Avatar for emanmae

So i have this homework assignment and im having a problem figuring out how to get the numbers from this file and finding the agerages. heres what i got so far. [CODE]#include <iostream> #include <iomanip> #include <fstream> #include <string> using namespace std; int main () { // Declarations string reply; …

Member Avatar for emanmae
0
182
Member Avatar for Erroneous Seth

Hello to everyone, I am having this problem with the following code: [code] typedef struct test { int i; char c[50]; } testStruct; int main() { char *pData; testStruct t; t.i = 5; strcpy_s(t.c, 50*sizeof(char), "hello"); pData = (char *)malloc(sizeof(t)); memcpy(&pData, &t, sizeof(t)); testStruct a; memcpy(&a, &pData, sizeof(t)); cout << …

Member Avatar for Erroneous Seth
0
243
Member Avatar for NathanOliver

Hi have made some code that will generate alphanumeric passwords and output them into a file. Each password size has its own function so i have 16 functions for sizes 1-16. The code works great its just that as you go up one size in the password size it will …

Member Avatar for NathanOliver
0
85
Member Avatar for sabian4k

what exactly is mean by paper to pencil algorithm and what is it? I am doing a program where two numbers are stored in an array, and are reversed in the array, and I need to add them together, how do I go about doing it with paper to pencil …

Member Avatar for siddhant3s
0
196
Member Avatar for tgsoon2002

Can i have some example for "if string is found" I have no idea what syntax for this. compare, find or seek or what else i don't know?

Member Avatar for boblied
0
65
Member Avatar for BlackStar

from the pointer problem thread. I got this, [ICODE]void is_valid (char& s) { return s=='1' || s=='2'; } void is_submenu(char& m) { return m=='x' || m=='y'; } // then i'm using it in my main. char choice; cout<<"enter your choice"; cin>> choice; if( is_valid(choice) { if(letter == '1') { // …

Member Avatar for BlackStar
0
221
Member Avatar for Adexter

Hi, im working on a project for school and Im having a little trouble. The problem states: Write a program that reads students names followed by their test scores. The program should output each students name folloed by the test scores and the relevent grade. It should also find and …

Member Avatar for Adexter
0
2K
Member Avatar for asweetroxxi

i have the shell of the code but im have some trubble i need to write the function that lets the user input a zero or a one. it have to be done in a loop the shell is shown: [code] #include <iostream> using namespace std; int const MAX_ROW=10; int …

0
146
Member Avatar for smyth9957214249
Member Avatar for tux4life
0
60
Member Avatar for ganmo

Hello, This is probably a simple question. I have a class A, and a class B, class C class... which inherits from class A. Now I want to store it in a container e.g. vector [CODE=cpp] vector<*A> container; [/CODE] I have also created some objects of B and C, and …

Member Avatar for ganmo
0
111
Member Avatar for lilballeer

hello, I am trying to change my current code to include the following class definition. class studentType { private: string studentFName; string studentLName; int testScore; char grade; public: void getData ( ifstream & inFile, studentType sList [ ], int size ); void calcGrade ( studentType sList [ ], int size …

Member Avatar for vmanes
0
229
Member Avatar for Lukezzz

I am trying to create a folder under the "HKEY_CLASSES_ROOT" in the Registry Editor. I run this code but I cant find that "TestFolder" was created here. I wonder if I am doing this correctly ? [code] Microsoft.Win32.RegistryKey Test = Microsoft.Win32.Registry.ClassesRoot.CreateSubKey("TestFolder"); [/code]

Member Avatar for Lukezzz
0
135
Member Avatar for sabian4k

hey guys i'm stuck big time, i need some major help. [code] // ************************************************************* // This program adds large integers that are stored in arrays. // The digits are stored in the array in reverse order so that // addition is easier. The program allows a user to keep doing …

Member Avatar for Salem
0
102
Member Avatar for Audette

Hi, I am currently running some C++ code in Windows. I am using Code::Blocks with mingw therefore using the gcc compiler. Can anyone tell me, is thespeed of execution of the final .exe file dependant on the compiler? e.g. will the speed change if I use Visual C++ 2008 Express …

Member Avatar for GDICommander
0
274
Member Avatar for nanchuangyeyu

Hi, I have written a 2*3 matrix[1,2,3;4,5,6] to file. And then I tried to read the data back to initialize a 2D C++ vector. The code is as following: [CODE] #include <cmath> #include <string> #include <iostream> #include <sstream> #include <fstream> #include <vector> using namespace std; int main() { ofstream out_file; …

Member Avatar for nanchuangyeyu
0
119
Member Avatar for Truclam

Hi all, I implement Gabor filter in my c++ function (put it in Visual c++) . when I compiled it there was no error but when I clicked on a button for excution this function there was a failure report. I can't find out the mistake so I hope some …

Member Avatar for Nick Evan
0
248
Member Avatar for Reprise

Hello again. I was shown this small piece of code when making a command-line based menu, where you enter a number to perform a certain function. [code] while (true) { displayMenu(); if(!(cin >> key)) { if(!cin.eof()) { cin.clear(); cin >> dump; } continue; } // etc [/code] I cut the …

Member Avatar for ithelp
0
93

The End.