Beginners - June 2015 (Page 28)

by d1729
C++11 File input output
 
I am trying to solve the usaco gift1 problem(greedy gift covers) but I am getting all the answers as friend's name followed by 0.Please can someone help? The qu...
[1 reply] : You should check whether the files could be opened, othewise you get b... (by coder777)
Checking a Linked List in another Class
 
I have on class that represents a Linked List of template<class Object> and another class IntList which uses that Linked List class as a private data member. ...
[1 reply] : Make a function inside your IntList class that compares the current In... (by Smac89)
adding items to get a total price of a computer.
 
So the code that I have done so far is below, basically I need to build a program that will allow a user to select one of the items from each list (i.e cpu, har...
[1 reply] : Hint: Try a loop of some sort based on user input. (by closed account 48T7M4Gy)
Conquest Dicom Open Source Project
 
I have been trying to compile the open source dicom/pacs implementation available at http://ingenium.home.xs4all.nl/dicomserver/dgate1417d.zip. But unfortunatel...
[no replies]
Dynamically allocating class object
 
Continuing off post I made earlier in this forum I'm trying to implement a program where the user can enter Title, Authors, and Publication of Books. I need to...
[4 replies] Last: Ohh... I was under the impression that pointers always needed to be of... (by Extreme112)
Calculating months difference (Age Calculator)
 
Hello everyone! I've recently just started a new project to create an Age calculator in c++. I have made it so that it now successfully calculates your age. I a...
[4 replies] Last: If your question is how many days then you continue the calculation. H... (by closed account 48T7M4Gy)
using functions
 
I am trying to create a program using Functions that will read a list of names and grades from a text file.That will also average the grades from highest to low...
[2 replies] Last: Ran your code and your function GetHighest has a g unfinished which yo... (by OmegaZero69)
Experience Programmers
 
Below is C code for the merge sort algorithm. Programmers it is your job to produce a main.c that tests the functionality of the mergeSort library and to ex...
[1 reply] : Smells like homework. Programmers it is your job ... I do assume tha... (by keskiverto)
How do I make my number show as 1.0 instead of 1
 
#include <iostream> #include <iomanip> using namespace std; int main() { float membership = 2500.00; cout<<"Membership fee \tYear\n" <<"----...
[3 replies] Last: When floatfield is set to fixed, floating-point values are written us... (by closed account EwCjE3v7)
by pravi
C output different
 
Why is the output different in C? <#include<stdio.h> #include<conio.h> void main() {float a=19234.84797; printf("%f",a); getch(); }> Instead o...
[2 replies] Last: A float is typically a 32 single precision value with only about 7 dig... (by dhayden)
Regex question
 
Hello. How do I modify this pattern so that regex_search would find ONLY "\w{4}"? int main() { string s; getline(cin, s); regex pat(R"(\W\w{4}\W)"...
[7 replies] Last: To match previously matched text again, use a backreference. http://ww... (by JLBorges)
Multimap problem
 
Hello. I get "error C2664: 'bool NameCompare::operator ()(Product &,Product &)' : cannot convert argument 1 from 'const std::basic_string<char,std::char_traits<...
[2 replies] Last: Thanks. But since multimap has value_compare member I could do it diff... (by mighty asker)
Input test
 
Hello everyone, I'm very new to programming and taking an intro course for fun. I have a project due tonight that I wanted to spice up a bit if I can. Here is ...
[3 replies] Last: Dupe post!!! Here... And there... Input test http://www.cplusplus.c... (by andywestken)
Using cpp code in python and R
 
Hello! I have a following task to do. Lets say I have a simple function written in c++: double** myFunction(double** myPointer) { // some calculations...
[1 reply] : Google says for " call c++ from python ": https://docs.python.org/2/ex... (by keskiverto)
Need help with an error I'm getting!
 
The error I'm getting is converting to 'long long int' from 'double'. I'm not sure why I'm getting this, if someone could take a quick look and see if you co...
[2 replies] Last: Line 37: // firstTerm = pow(termOne, 1.5); // *** error: 'firstTerm'... (by JLBorges)
by pravi
Different output in C
 
Why is the output different in C? <#include #include void main() { clrscr(); char a ="lk"; printf("%c",a ); getch(); }> Instead of getting lk...
[4 replies] Last: I think you both missed the point. The OP es expecting "lk" as output... (by AbstractionAnon)
Pointers, Structures, and Dynamic Allocation of Memory
 
Hello! I know I have been posting a lot but I have been learning so much from this community! So thank you. Someone has mentioned that it would more organized f...
[2 replies] Last: softrix has posted a very nice example that is very close to what yo... (by AbstractionAnon)
by Smokey
Please Help
 
Write a program that creates an array with 34 integers like this: 0, 3, 6, 9, 12, 15, ..., 99 Ask the user to guess a number from 0 to 99. Use a bin...
[5 replies] Last: http://stackoverflow.com/questions/700241/what-is-the-difference-betwe... (by booradley60)
Weird Arrays
 
When I allocate the correct number of arrays, the program goes all weird. But when I allocate one extra spot, the program works correctly. However, I'm not sure...
[7 replies] Last: @mutexe @andywestken Okay. I see where the problem is. Thank you so ... (by jhykima)
by pravi
C output
 
Why are the ouputs different? <#include<stdio.h> void main() { int a=010; printf("\na=%d",a); }> <#include<stdio.h> void main() { int a=010; pri...
[3 replies] Last: Thanks to all for your useful answers. I somewhat get it. But, I would... (by pravi)
June 2015 Pages: 1... 2627282930... 32
  Archived months: [may2015] [jul2015]

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