49,761 Topics
| |
Ok so im having some trouble trying to figure out how to read a line from a txt file which ive incorporated my C knowledge about reading a txt file into this main file. apparently im getting it wrong and Im almost confused. any help would be nice. posting my … | |
we started classes, i need some pointers on my code if you can help please. Define a class called Month. Your class will have one attribute of type int to represent a month (1 for January, 2 for February, and so forth). Include all the following methods in this class: … | |
Hi Folks -- I'm an old Borland C++ 4.52 guy who used to rock at OWL and BDE in the 90's, but I'm not a programmer anymore. I still keep my fingers in it -- I've been maintaining a hobby app using my old BC++ 4.52 compiler from '95, and … | |
When I included a dll file into my project, I used: [CODE] HMODULE g_hModule = GetModuleHandle( 0 ); HRSRC hRes = FindResource( g_hModule, MAKEINTRESOURCE( ID_DLL_MYDLL ), "ID_DLL" ); HGLOBAL hResource = LoadResource( g_hModule, hRes ); DWORD iResSize = SizeofResource( g_hModule, hRes ); BYTE* pData = ( BYTE* )LockResource( hResource );[/CODE] … | |
hey guys. i'm working on this project and i can't seem to get it figured out. there's a lot of steps involved, but i can't get any further right now because i cannot seem to figure out how to place values in an array. the program should ask the user … | |
Hi, I am writing a program for my C++ class that must create a struct(Hero) and make an array of it. My class is using the lvp library and i was wondering if anybody could help me make a vector of hero objects. This is what i have so far: … | |
I am a student at the university .. I have many tests .. and I have a project to earn a few degrees .. I want to convert such a difficult equation, known as Chebyshev? A program in c + + | |
//Program checks employment status, if part time, NO VACATION, if full time, program goes into if/else nest and asks for number of years working at company. More than five years,full time employee granted 3weeks of vacation. Five years or less, full time employee is granted 2weeks of vacation. [CODE]#include <iostream> … | |
can i make a program open another program after a user selects it such as i am making a menu and i want if the user enters 1 it opens the program accociated with 1 or will i have to paste all the files from the external program to the … | |
Hi i'm a student and have problem with moving bitmap. I must load it in the center of client area and after there moving using keys but it doesn't work :( Can you help me this is the code:[CODE] CKursovaView::CKursovaView() { size=CSize(50,50); // TODO: add construction code here } CKursovaView::~CKursovaView() … | |
As requested by a friend in email, I wrote a a simple attack routine in a 20d ad&d style. As you all can see, I'm not a programmer. I dabble. I was trying to show how the attack is calculated, nothing much more than that. Though this code works, it … | |
hi i'm currently in need of a quit option i have something like for example click 2 for quit but i don't know how to make a command for it, could someone please help me | |
Hey everyone, I got bored and decided I wanted to make a 'pitch' cards game in c++, however I came across the problem of generating all 52 cards in a deck without duplicating the same card. So basically, I just want to print out every single card in the deck … | |
hello, i want write a simple programe wich count the number of the chrechtar this is my code [CODE] #include <iostream> using namespace std; int main() { int count = 0; char str[30]; cout << "enter a word: " << endl; cin >> str; for (int x = 0; x … | |
i write now code the game of hang man i want code sound in eclipse if true or false Brief sound teacher she said the cod is one line after Loading any sound plaaaaaaaaaase i want help | |
Hey I'm new here so forgive me if I do something wrong. Just let me know and I'll try to fix it. Basically I'm trying to write a binary search tree without using recursion. (Difficult I know, but if you can show me how to do it without changing the … | |
i am trying to merg two linked list. error occurs when i run the program it dead. i believe it is because the function i defined to merge these two list has problems would someone helpe me to fix it or some hint would be nice thanks[code]#include <stdio.h> #include<malloc.h> typedef … | |
I'm trying to create a simple network with perceptions and it doesn't seem to be working. I was wondering if someone could correct my mistakes. Thanks! [CODE]#include<iostream> #include<cstdlib> using namespace std; int pWeights[] = {0,0}; int Classify(int pInput, int pThreshold, int i, int Bias){ int classOut; if( pInput*pWeights[i] + Bias … | |
How can I fix this so it will let me compare the two? note, the error is at the for loop. [CODE]string Socket::Recv() { /* Get socket size before recv'ing */ while (size == 0) ioctlsocket(client, FIONREAD, &size); /* Create a 'string (characters)' the size of the information being recv … | |
Hello-- Inside of a header file (Point.h), I've created a class template. I need to override the addition operator as shown below, so what I have done is declared it as a [I]friend[/I]. However, when I try to access the private member variable [I]std::vector<T>coord[/I] from within the body of the … | |
Hi. I have a richedit control and when dropping text from another control I would like to change the format of that text. I wonder which messages I should trap or how to do this in plain Winapi. (I have already subclassed the pasting message) Thank you. | |
hi, I am a new member here i hope that found some one who can help me in this C++ project I am a novice in C++ and this will be my first code if any one has experience please help me in the algorithm and what should i do … | |
Hi, I've been trying to capture video from webcam using openCV functions and openGL for rendering. The code is working fine and I can acquire and display both the cameras. Now I'm trying to record the captured video's and saving them to a file using openCV createvideowriter object. I can … | |
hello geys, i have some codes and i tried to find the output for each of them. most of the codes i answered but there are some codes which are strange for me (the output) first, i want from every one is to find the output without test it, please … | |
how to create circular linked list for the following situation? If there is upto n number like 123456 initial list, start counting from 1 12456 no. 3 eliminated, continue counting from 4 1245 no. 6 eliminated, continue counting from 1 125 no. 4 eliminated, continue counting from 5 15 no. … | |
[CODE]template<class type> struct _binary_search_tree { type key; struct _binary_search_tree* parent; struct _binary_search_tree* left_child; struct _binary_search_tree* right_child; }; template<class type>void tree_insert(_binary_search_tree<type>** tree, type key); int main() { char number[10]; _binary_search_tree<char*> root; tree_insert(&root, number); }[/CODE] [QUOTE]compile error: 755.c:182: error: no matching function for call to ‘tree_insert(_binary_search_tree<char*>*, char [10])’[/QUOTE] Thanks. | |
Create and use a function to calculate the standard deviation of the numbers in the array Output the standard deviation of the set of numbers | |
Hi Guys, I have a question on C++ object creation. Please consider the following code snippet. [code] class Foo { private: int i; public: A(int ii):i(ii) {}; }; int main() { const Foo &ref = Foo(1); } [/code] Here I am bit confused about the line : const Foo &ref … | |
Im desperate here I have been working on this hashing program and im really bad at multiple files I followed all the rules in books and web pages I have seen on the topic and still cant get it to compile =(. I have included my 3 files I also … | |
I have an assignment where I'm supposed to "implement a class, Point that represents a point in a three-dimensional space." and im supposed to "carefully design the interface for this class and include functions that appear to be useful for operating on points." I'm not fully sure what this is … |
The End.