49,761 Topics
| |
Hi, I'm trying to make my own library so that I know the names of the functions and can use them more simply. Also, I normally don't get the File I/O right so if I write the Library once, then I can use it over and over again (without having … | |
Hey everyone :) Hope you can help Here is what I've done with the instructions given: I need to know the average price difference between the cash and credit prices. But i'm pretty sure that only comes in at the end. Here is what my this function is supposed to … | |
Hello, I'm triyng to connect a camera to a VMR9 filter and I do the following: Create the filter graph Create the VMR9 filter Add the VMR9 Filter to the graph Create the video source filter and add to the graph Create an instance of capturegraphbuilder2 and reference it with … | |
Hello there, im writing code for my asteroids game and am nearly finished but ive come across a problem when trying to load the file the save game is written like this and works perfectly fine, it saves the things i want to a text file: [CODE]void WrapGame::save() { cout<<"enter … | |
So i read the "Flush Cin" post at the top of the thread and it just flew right over my head. I have a simple if statement that uses int values to determine where to send the user. If the user enters a char value it shoots itself into an … | |
Hi to all. I am a beginner at C++ programming. I wanted to ask for some tutorials or videos from which I can learn.. I have done some small steps in programming before and I really love it. I am very interested in this area and I would be thankful … | |
[CODE]/* functions: main >> output instructions input P1 name, p2 name loop{-clearscreen- output board, compute scores P1 or P2 turn, output scores input placement of next piece check coordinates and flip away} loop ends when a)P1_score+P2_score=100 b)checker declares there are no moves left c)Q is entered instead of proper coordinates … | |
Hi there, I have searched for an answer to this problem but cannot find one even though there is probably a very simple solution. I would like to pass an int to a function in pthread_create. I can do that easily. The troublesome part is when I have to cast … | |
Hi, Ive written a program which is capable of sorting an array of ints e.g. array[6] = {4,6,-1,0,6,4} however i want to expand this so it will be able to order chars as well. With my code as it is, it will order chars correctly i.e. sort the numbers out … | |
Here's the C++ code i did for myself: [CODE] #include <iostream> #include <fstream> #include <ctime> #include <cstdlib> #include <string> #include <cctype> void terminate() { const unsigned short SEC = 5; // constant for 5 times std::cout << "\nProgram will close in,\n"; // print for (int c=SEC; c>=0; c--) { if … | |
I recently took upon myself the challenge of finding the actual subsequence in an array that yields the largest sum rather than just the largest sum. Example - if you enter {3,2,-5,4} in an array, my program returns {3,2}, since that yields the largest sum, 5. I thought myself rather … | |
Hi, I'm writing a program for structural engineers that consists of a number of inherited classes. Specifically, I have a main() file which includes a class [I]element[/I] which includes a class [I]node[/I] which includes a class [I]matrix[/I]. [I]element[/I] includes variables of type [I]matrix[/I] and [I]node[/I], and [I]node[/I] includes variables of … | |
I've got a simple question but I can't seem to find the answer in any of my searchs. I know this is very basic and probably will require 1-3 sentences but, when I use a pointer to pass it by reference to a function, will it use the actual location … | |
Hello .. You have made a way to resolve code half-life, but missing something I want to help it .. Fuvction which solving the equation of the third degree in how to enter transactions have, I mean how can I insert s q v g Please help [code]#include <iostream> #include … | |
Hello, I am trying to write a templated linked list, and I am having some difficulties with the add() function. It seems like different behavior occurs depending on how I add to my list, but my two test cases don't seem that different to me. I'll post the list.h, and … | |
Hello every one am in real trouble now. i am in my 1st and last sem of my programing course. i need to write a program that can add delete display and update record. i got this program so far but the real prototype works fine for this program and … | |
Hi, I have been trying to use the following code: VendingDisplay.h: [CODE]#include <stdio.h> #include <string> #include <vector> #include <iostream> #include "VendingMachine.h" class VendingDisplay { VendingMachine vend; public: VendingDisplay(VendingMachine); VendingDisplay(); void DisplayMenu(); void GetUserInput(int); int respondToUserInput(int); void processOrder(int); int processCorrectCash(float); };[/CODE] VendingDisplay.cpp: [CODE]#include <vector> #include "VendingDisplay.h" #include "VendingMachine.h" #include "Cigarette.h" //#include … | |
I'm having a hard time understanding how to sort loops and the different types. I've read several articles, reviewed several programs, and still cannot grasp how to sort arrays let alone do anything else with them, I.E. add rows/columns, find the mode, ect... I know the different types of sorts, … | |
Ok, somewhat easy task, but i dont know how to do it. Basically i need to take a currenty written dll file ( which i dont hae the source code for) and i need to copy all of the original content and i need to import some functions from another … | |
Hello, I'm new to MFC and i have a small problem. I made an application containing a property sheet with 2 property pages and i defined the next,back and finish buttons to switch between pages. I implemented the functions of each page in its InitDialog. In the first page i … | |
Hello All. This is my first post. I would really appreciate if you can help me in a project I have to complete as soon as possible anyway, the thing is this: I have a bunch of numerical data in any format (say an excel page with 3D vectors, or … | |
My code: [CODE] cout.setf(ios_base::fixed, ios_base::floatfield); plan++; double Annually, Monthly, Daily; Annually = CompoundAnnually (principal, rate, years); Monthly = CompoundMonthly (principal, rate, years); Daily = CompoundDaily (principal, rate, years); cout << setw(3) << plan << "\t"; cout.precision(0); cout << setw(10) << principal << "\t"; cout.precision(1); cout << setw(7) << rate << … | |
I have problem in count substring from a file that have sequence of string.After i run the code, the result should be bigger than 1 but the code still show the same result which is 1 every time i run the code.I don't know where are wrong. Any help is … | |
hey again i do that problem from my book, worked but i am pretty sure is not the exhaustive technique that book is asking cause i didnt have success and was too fast. i tried a counter and do 64x64 loops or 4096 loops. so my question cause i couldnt … | |
Evening Everyone: I'm a bit of a newie with C++, and can't determine where to "declare" the functions in the following code. The compiler is stating I haven't defined the functions, but I've followed the instructors directions, and am now stuck. YAY! Thanks so much! #include <iostream> using namespace std; … | |
Hi this is more a formatting issue and i was just wondering if anybody could let me know if my problem can be solved. In my program i am outputting four pieces of information on one line, all of them are numbers and one is an integer and the rest … | |
Hey guys Here's my code that is giving me a compiler error ? Why is my darling computer complaining so horribly about what I always do with cin and cout which is give them their respective accessories >> and << ? Here's the code for the main function: int main() … | |
i want c++ to perform each and every some that i can think so i don't know where i have gone wrong #include<iostream> using namespace std; int main() { int x,y,z; cin>>x>>y>>z; cout<<"sum is"<<x,y,z<<endl; return 0; } | |
i have a variable "float PI = 3.146;" in a header file called "evar.h" but when i use the variable PI in my main functoin it only comes out as "3" , i have to explictly type cast it for the number "3.146" to be printed out how could i … | |
Hi, guys I never done this before but I want to make a program like a YouTube Downloader. I just don't now how to start. I found at that a HTTP Request requests a FLV file called videoplayback (without an extension). If I goto to the request's link, it downloads … |
The End.