49,761 Topics
| |
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 … | |
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++ … | |
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 … | |
| |
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 … | |
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??? | |
What is the best way to do system wide user mode (NOT KERNEL MODE) api hook on Windows NT? | |
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. | |
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] //************************************************************** … | |
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* … | |
>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 … | |
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 … | |
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 … | |
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; … | |
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 << … | |
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 … | |
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 … | |
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? | |
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') { // … | |
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 … | |
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 … | |
Write a program to print the value of a class using function overloading | |
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 … | |
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 … | |
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] | |
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 … | |
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 … | |
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; … | |
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 … | |
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 … |
The End.