Beginners - May 2015 (Page 17)

Reading Text File to Linked List
 
Trying to read a text file to a linked list. The text file looks something like this: Name: Smith, Joe ID: 346 Hours: 40 PayRate: 10 The text file wil...
[no replies]
changing values in Pointer to pointer and pointer to address
 
I have these to following codes #include <cstdlib> #include <iostream> using namespace std; int main(int argc, char *argv ) { char sting ; ...
[1 reply] : Why? In your second bit of code: 1. you define a char* variable sti... (by andywestken)
Simple Calculator
 
I have an assignment that request I create a simple calculator that can handle user inputted integers for (addition / subtraction / multiplication / division / ...
[3 replies] Last: Professionally, you're more likely to encounter a situation like your ... (by pnoid)
Base class question!
 
Can you inherit two classes that share the same pure virtual member? I want to make a base object class that can be turned into different shapes. example: sf::...
[7 replies] Last: yeah, it looks like it works. // Example program #include <iostream>... (by Gamer2015)
by pardi
array
 
hi. wanna know if i can have an array with unlimited value or not. s.th like this: int a; cin>>a; char b ; in which i can let the user choose how long ...
[6 replies] Last: Which is a very bad idea, because you'll end up with memory leaks ... (by Codermik)
by MRQ1
Programming small games and software
 
I have some basic to intermediate understanding of C++ now but I still cannot write something other than a calculator or a quadratic equation solver etc without...
[2 replies] Last: Well can you help me what should I practice and where can I get someth... (by MRQ1)
by HelenI
Char
 
Hi...i'm trying to put some characters into a vector but i only get the first 2 of them. Example:abca output: ab while(cin>>c){ q.push_back(c); ...
[2 replies] Last: thanks (by HelenI)
Return array from function!
 
Hi, I am trying to create a function that returns 5 random dice values back to main. void generateDice (int *dice ) { string reRoll; for...
[2 replies] Last: You're going to have to supply more information. Since you say thi... (by AbstractionAnon)
Point Structure
 
I created this point structure that I'm pretty proud of. I was wondering if the professional programmers could take a look and let me know any ideas to improve...
[5 replies] Last: I should have been more explicit. The return type of those functi... (by AbstractionAnon)
by wrymn
Header include problem
 
I am really desperate trying to figure this thing out for hours and hours. Please if anybody can help, I would really appreciate. I have 3 header files: Compo...
[4 replies] Last: hehe no problem, you gave me some ideas to think about :D The thing I... (by wrymn)
by TestT
Include Problem
 
Hello, I try to program C++, but I get some errors. Can you please help me. Error: Fehler 3 error C2061: Syntaxfehler: Bezeichner 'Test2' \test\test1....
[7 replies] Last: Test1.h #pragma once #include "Test2.h" class Test2; class Test1 {... (by TestT)
by Aye
Help please asap..
 
Hi everyone, i have an assignment about 2d array, i should read marks from a file with strings but whenever i run the program it show out only the first line of...
[10 replies] Last: #include <iostream> #include <string> #include <fstream> int main() ... (by JLBorges)
Adding Conditions for the CIN function
 
I am working on a simple calculator program, and would like to support conditioned CIN input streams, i.e. only allow whole integer submissions and no letters e...
[3 replies] Last: I don't think you need to worry about letters or symbols. Because you ... (by Momothegreat)
Accessing placement new buffer
 
#include <cstdlib> #include <iostream> using namespace std; class Obj{ public: Obj(){cout<<"Obj1 has been created"<<endl;} ...
[3 replies] Last: This entirely depends on how what exactly you're trying to do. For exa... (by shadowmouse)
Char array limit
 
Hi, I am pretty new to c++ and am currently working on user input error checking for some code. I was wondering how I could check something like this: ...
[3 replies] Last: That still does not change anything using this condition: I can promp... (by admkrk)
Float Variables
 
So I am beginning in C++, and I am making a calculator. I made it work so you can plug in "5*5" or anything else and it will give the answer. But then I wanted ...
[2 replies] Last: You're adding a new character variable and a third integer which you d... (by Momothegreat)
Linked List
 
I am struggling with how to build a linked list. My program is a menu driven program with 6 options. The first option is to add a file. The user is prompted ...
[1 reply] : It sounds like you need to create a struct in your linked list to hold... (by Bdanielz)
by fpro
How do I use a class as a member of a class and other questions
 
I am learning C++ through online tutorials, though I must have not gotten to the part where this sort of thing is described. I am trying to create a class th...
[1 reply] : Define the first class in first_class.h // first_class.h // include ... (by JLBorges)
Array the best method?
 
I'm trying to return an integer from a non-linear set of integers in a given case. The values in each cases array remain constant. This function can be called n...
[3 replies] Last: These are all good questions. Let's start with the most important one:... (by dhayden)
functions what am i doing wrong? Please help
 
i need to write a function that reoders 4 numbers inputed by a user in descend order. this is the code i have so far but it keeps on giving me weird output PLea...
[1 reply] : First of all, I would use else if after the first if Second, why n... (by Homberto)
May 2015 Pages: 1... 1516171819... 40
  Archived months: [apr2015] [jun2015]

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