Beginners - February 2014 (Page 19)

Trouble using std::unique_ptr
 
So being the humble human I am during my never ending endeavor to learn I found this example code in my book, promptly attempting to compile and run it I fou...
[7 replies] Last: @Mats, Hey it worked just dandy, I knew it was up to date but for some... (by ragecoder)
A dynamic array objects in a class
 
I'm designing a program that mimics a small banking program. There's two classes I'm trying to design right now, which is the transaction class and the account ...
[3 replies] Last: Okay, then you'll have to do it yourself manually.... class Account ... (by long double main)
problem getting my classes to work
 
Just trying to get it to work. I am new to classes and have read over the tutorials, including the one on this site, but am still confused. Whats wrong? ...
[2 replies] Last: solved thank you (by pilotnate)
I need Help here
 
Hello Group! I am new here and need help on this project, any one please help me. When I Run it it give error. #include<iostream> #include<conio.h> #inclu...
[12 replies] Last: Here I could fix it, A digital clock. #include<iostream> #include<wi... (by alirezahusainy786)
Want my function to move string from one array to another
 
I have some function: int doSomething(string o , int n) but I want to copy elements in array o into another array. How can I do this given that o is of vari...
[4 replies] Last: There's already something for that in C++. std::set. (by S G H)
How to get the number of letters of inputted words?
 
How do you get the lowercase and uppercase letter count of a inputted word? #include <iostream> using namespace std; int main() { char word ; i...
[2 replies] Last: Still doesn't work... //To initialize to 0 for(int i=0; i <= 100; i... (by micros24)
Move items between arrays and vectors
 
There is some barrier and I want to rearrange the array such that all values < barrier come first and > barrier come last. What I thought to do was evaluate eac...
[8 replies] Last: I don't really know what motivates it. I wonder if it's students bein... (by MikeyBoy)
always compile previous file
 
i've been doing c++ in multiples files/headers( 3 files in same time). but when i try to compile and run, it can be compile but the command prompt always run th...
[1 reply] : What are you using to compile? What are you using to run? (by ValliusDax)
computer info
 
I have been working on learning code by my self and I was told it would be cool to be able to read the CPU temp and stuff like that so I was wondering if any on...
[3 replies] Last: There is no standard way of doing this from C++, this is a function th... (by ValliusDax)
emptying an int array
 
Okay so i need to create a program about sorting and those kinds of things. My professor wants us todisplay an array with several names and array with the link ...
[6 replies] Last: Hi @jva2794 The arrays you are using will be texts? If yes, then if ... (by Jecs9)
College C++ Student w/questions
 
Hi I am a BS Computer Science major in my 3rd year learning C++. I have taken the 3 basic coding classes for c++. However, I feel like I am lacking in actual co...
[3 replies] Last: Well, I design computer chips for a living, so I always approach codin... (by ValliusDax)
Need direction with fstream project
 
Hello, my assignment is to make a program that takes a file as input, reads the lines, and outputs them in a different format. It's something like: lastName f...
[2 replies] Last: I agree with Smac89 a little... You could use >> and try to match up ... (by ValliusDax)
urgently need help trying to get this equation to work in c++?
 
I can't seem to get the right answer. I'm supposed to be calculating the volume of water in a water tower. The "truncated cone" formula is 1/3 * π * ( r1^2...
[9 replies] Last: @xsimn, And he takes a bow. ;~) (by ValliusDax)
warnings and segmentation fault
 
I wrote a program that gets the name of a file from a argument vector then it reads info from that file into a linked structure list, then it either searches fo...
[10 replies] Last: argv , like cire and I were discussing. Also, your else block has no b... (by ValliusDax)
by btbtbt
(data structure) sorting algorithm
 
I am having my first assignment about data structure in C++. It is about a sorting algorithm. It is suggested to use (1) MSD radix sort, (2) std 2D-vectors. T...
[2 replies] Last: I'll try it, thank you. (by btbtbt)
Program to evaluate a polynomial function
 
Hi everyone! I'm hoping someone could steer me in the right direction or tell me where I'm going terribly wrong with this code. I need to enter the degree o...
[1 reply] : int *c = new int ; //i=0 here for(i = 0; i <= d; i++) ... (by ne555)
Pointers, Loops, Array combo
 
Hello. Loved Java, but having trouble with c++. Been working for hours, and finally finished my project. I have one more small problem, and I can't figure it ou...
[1 reply] : int* ps = 0; salary = *ps; it should be : int* ps = salary // ps... (by nvrmnd)
by Huppa
Sentinel Value & Float Variables
 
I want to add a line that will count how many grades are 93 or over and output the count. How could I go about doing so? //grade2.cpp //Class avg. w/ sen...
[2 replies] Last: Thank you very much. (by Huppa)
by cozier
Passing by reference, stuck.
 
Working on a pass by reference project. I am able to pass off the variables sum and product, but cannot for the life of me send and return the double quotient v...
[1 reply] : a and b are integers, so a/b does integer division. Cast one to a floa... (by Zhuge)
by ccdare
Question about bound template friend of template class.
 
template <typename T> void show(); template <typename T> class test { T a; public: test() :a(0){} test(int x) :a(x){} friend void show<T>();//bound templ...
[5 replies] Last: > the instantiation inside the class is this format: > friend void sh... (by JLBorges)
February 2014 Pages: 1... 1718192021... 60
  Archived months: [jan2014] [mar2014]

This is an archived page. To post a new message, go to the current page.