49,757 Topics

Member Avatar for
Member Avatar for UltimateKnight

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 …

Member Avatar for Tamlyn
0
298
Member Avatar for silverpanda

[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 …

Member Avatar for pseudorandom21
-1
144
Member Avatar for initialise

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 …

Member Avatar for initialise
0
7K
Member Avatar for flyboy567

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 …

Member Avatar for mike_2000_17
0
157
Member Avatar for lanzslumber

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 …

Member Avatar for rubberman
0
255
Member Avatar for Coffee_Table

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 …

Member Avatar for Coffee_Table
0
242
Member Avatar for v_janssens

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 …

Member Avatar for v_janssens
0
193
Member Avatar for jackmaverick1

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 …

Member Avatar for gerard4143
0
135
Member Avatar for Roo0ond

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 …

Member Avatar for Roo0ond
0
56
Member Avatar for mmartino

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 …

Member Avatar for Fbody
0
177
Member Avatar for ashrafu1

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 …

Member Avatar for ashrafu1
0
178
Member Avatar for tangentplane

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 …

Member Avatar for thekashyap
1
4K
Member Avatar for NvIs

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, …

Member Avatar for thekashyap
0
169
Member Avatar for MasterGberry

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 …

Member Avatar for thekashyap
0
2K
Member Avatar for ddd104

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 …

0
39
Member Avatar for KansaiRobot

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 …

Member Avatar for KansaiRobot
0
189
Member Avatar for caltech

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 << …

Member Avatar for inputbear
0
188
Member Avatar for hazila

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 …

Member Avatar for Ancient Dragon
0
115
Member Avatar for ntrncx

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 …

Member Avatar for template<>
0
202
Member Avatar for figment56

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; …

Member Avatar for figment56
0
228
Member Avatar for flyboy567

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 …

Member Avatar for flyboy567
0
84
Member Avatar for Tamlyn

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() …

Member Avatar for Tamlyn
0
246
Member Avatar for taumang

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; }

Member Avatar for saadsaidi
0
126
Member Avatar for RyanMcMillan

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 …

Member Avatar for RyanMcMillan
0
175
Member Avatar for electrox73

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 …

Member Avatar for pseudorandom21
0
814
Member Avatar for Colezy

Hi all, I am creating an application that includes and calls upon someone else's code. I need to slightly change the functionality of a constructor in their code but the class I need to change is buried away very deep. I considered inheriting from the class so I could change …

Member Avatar for Colezy
0
114
Member Avatar for dospy

i know you cannot understand anything from the title and i am sorry but i don't know how to say it because it's a little complicated, so i won't give details of my problem, i hope you can understand from the code classB.h: [CODE] #ifndef CLASSB_H #define CLASSB_H class MainClass; …

Member Avatar for dospy
0
180
Member Avatar for maxstoto

Please help me in Binary XOR operation using C++? Please help me in Binary XOR operation.... This program will ask user to enter their input..After that the program will convert to Binary Code for each character that user have entered. After that i create a multidimensional array to store for …

Member Avatar for jshoot
0
292
Member Avatar for ChaseRLewis

Confused on why even though I have this header linked several times: [CODE] #ifndef ASCII_CHAR_NAMES_H #define ASCII_CHAR_NAMES_H extern const unsigned char ASCII_WHITE_SMILEY = 1; //☺ extern const unsigned char ASCII_BLACK_SMILEY = 2; //☻ extern const unsigned char ASCII_BLACK_HEART = 3; extern const unsigned char ASCII_BLACK_DIAMOND = 4; extern const unsigned …

Member Avatar for mike_2000_17
0
159
Member Avatar for Sc@recrow

As part of an assignment, we have to write a Quicksort algorithm, and then verify it's time complexity. I am trying to time how long it takes to run the quickSort function, but it keeps returning 0. Here is a snippet of the code [CODE] . . #include <time.h> . …

Member Avatar for rubberman
0
128

The End.