Beginners - November 2014 (Page 38)

by Selver
typedef const reference
 
Hello all Im working on an assignment to implement the functionality of the list class. I've got it 90% done, but the typedefs for references are giving me trou...
[2 replies] Last: A better question then, what exactly should I be returning in those fu... (by Selver)
by bpro
generateRandomNumber function layout help!
 
I need to create a function that will generate a random number between 1-25000. I am completely lost when creating the test code, so I haven't been able to vali...
[1 reply] : I can't tell my looking at this since it's just a part of a program, b... (by JoJodoggy1)
I want array to not read first integer
 
So I have a file names sortme that reads: 5 d 99 0 3 45 2 I want to read this file to an array: void readftoa(int x , int &n) { fstream inpu...
[1 reply] : Please, do not double post. It clutters forums and spreads attempts to... (by MiiNiPaa)
How do i get array to ignore an integer from a filee
 
So I have a file names sortme that reads: 5 d 99 0 3 45 2 I want to read this file to an array: void readftoa(int x , int &n) { fstream inpu...
[1 reply] : std::ifstream input("sortme.txt"); //Open file in constructor int num... (by MiiNiPaa)
by NOD32
Help with bubble sort
 
I need help with my bubble sort algorithm. I'm not sure if i've coded it correct, but I want to sort the inputted array values in ascending order, and I want to...
[5 replies] Last: thanks. i have my sort working but i have one more problem with code. ... (by NOD32)
how to initialize arrays in constructor using passing by value
 
Hello all, i want to initialize an array in constructor and return it to main. I wrote a code but could not resolve. #include <iostream> using namespace...
[1 reply] : #include <iostream> using namespace std; class ArrTest { int num... (by anup30)
error: ld returned 1 exit status
 
compilation is fine but there is some problem in linking. But i am not able to track the error #include <iostream> using namespace std; class Node { ...
[3 replies] Last: ^^^ thanks.... mann i have started to make horrendous errors.. (by rahul135)
by Jon15
Formatting errors with loops and io stream objects
 
I have the code right for the most part, just my formatting is off. My loops aren't working exactly as i want them to and i am getting some unwanted things bein...
[5 replies] Last: I guess it's because of the extension you provide for the file "origi... (by closed account SECMoG1T)
by clypso
Help with "For"
 
I am very green to programming. Just started learning today. I am confused why in this code that integer 'sum' doesnt equal 100. I keep getting 0. Thank you in ...
[9 replies] Last: Oh.. Ok. Thank you everyone for your support! Much appreciated. I see ... (by clypso)
Help - Table in this
 
Hello i did the conversion but i still have more questions. Because it doesnt fit that topic anymore i create a new one. So the problem is simple. It prints ou...
[1 reply] : You're still having issues with reversals on any two-(or more) digit (... (by PCrumley48)
gratuity calculator
 
I need to create a gratuity calculator for a class. Here are the instructions: Design a Tips class that calculates the gratuity on a restaurant meal. I...
[10 replies] Last: Ok. I figured it out...I had the wrong formula for double mealCost and... (by lordzedd)
Performing mathematical operation on data read from a file
 
I have posted the dataset and the coding, i need to subtract the set of 13 values from the dataset from the array c1 and print the values. I am able to read th...
[1 reply] : I see several problems with your code. First the extraction operator... (by jlb)
Character pointer to string
 
When i declare char* szString = "Hello"; and then do the following, szString = 'J'; , and then try to print cout << szString; nothing prints, why is that?...
[1 reply] : Because trying to modify string literal is undefined behavior. Often i... (by MiiNiPaa)
by Negra
Matrix problem
 
Hello! My c++ code is not working properly, and i have no ide what is wrong. This is the problem. You have square matrix size 9×9. The part of the problem...
[2 replies] Last: If you find the highest value in your lower triangle while the numbers... (by PCrumley48)
Help with Class please
 
Here is my code : #include<iostream> #include<conio.h> #include<ostream> using namespace std; class MyClass { private: int a, b,c; public: MyClass(i...
[4 replies] Last: If I have to write a code specifically for that main to get that resul... (by closed account 1Ap9LyTq)
Trying to dynamically change the size of my array
 
Good afternoon/morning (depending on your time zone) after piecing together code I have found with some of my own, I have the program below. I am trying to make...
[4 replies] Last: The part about the correct input type, I am trying to force the user ... (by jlb)
by rouamd
help with link list
 
i need some help to develop a function for a link list you basically have to 1. Add 25 students with (ID ,Name, Department and Grade) 2. Print the name a...
[2 replies] Last: this is my code so far #include <iostream> #include <string> using... (by rouamd)
Help! decimal to binary
 
I need use 1 if/else for repetitive use and can use more for input constraints. if you enter 345 and 2 bits obviously it wouldn't work (1 if) and in the while t...
[5 replies] Last: As I understand it, this comment set describes what you want to accomp... (by PCrumley48)
C++ ip camera video recording source code
 
Hi all, I have read an article @ Codeperoject about how to build a video recorder application for an onvif ip camera (http://www.codeproject.com/Tips/826531/...
[no replies]
by LloydR
Practical and problem solving
 
Hello everybody! I am currently a newbie at C++ and programming at a whole. So far, I am enjoying learning the language, but I have hit a brick wall. I a...
[3 replies] Last: these set of questions solidifies your understanding. http://www.cplus... (by anup30)
November 2014 Pages: 1... 3637383940... 65
  Archived months: [oct2014] [dec2014]

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