Beginners - November 2016 (Page 8)

by nisor
How to call struct if it has a boolean type
 
Hello, I'm new to programming, and I have a question for you: Here is a part of my code: struct Tversenyzo { bool achieved_minpoint=true; b...
[1 reply] : Tversenyzo szampar ; is a 2D array. At line 41: szampar .pa... (by Chervil)
How to arrange array in ascending order?
 
Can you please help me to find out the problem in my code for arranging array in ascending number? #include<iostream> #include<stdlib.h> using namespace ...
[6 replies] Last: The advantage of Jaybob66's approach is that, if the array is already ... (by lastchance)
ATM Machine - issue storing balance
 
I'm working on a c++ ATM machine project, and I've run into an issue storing the balance amount beyond a single transaction. When the code runs, each iteration ...
[2 replies] Last: I've not gone through the code in fine detail. However, it looks as th... (by Chervil)
Can you define variables in a class/struct?
 
I used to own the C++ Primer 4th Edition which stated that definitions should not appear in headers. But the new edition has this: #ifndef SALES_DATA_H #defi...
[3 replies] Last: > So what is the difference between default member initialisers and no... (by JLBorges)
please help to make calculator using stack to evaluate postfix
 
#include <iostream> #include <conio.h> #include <string.h> using namespace std; struct node{ int data; node *next; }*p = NULL, *top = NULL, *...
[3 replies] Last: There are a few things about the design which could be improved - I'd ... (by Chervil)
by Zg0mY
Image analysis program
 
Hello Im just starting to learn c++ (i did a little bit of python,java). So i set my goal to make an weld image analysis program and learn c++ in proccess o...
[no replies]
HELP PLEASE!!
 
Wrote three parts of my code and was just about done. Which took about five hours which I dont have a again. When I opend it up it looks like this now! Please t...
[4 replies] Last: Unforntently the code was forever lost. Had to re-write it, thank you ... (by Brad 08)
Combination of set of numbers
 
i have 2 numbers x and y x=10 y=01 how can i generate all combination of these two numbers in six fields ex. xxxxxx,xxxxxy,xxxxyx,xxxxyy,....etc so on so f...
[10 replies] Last: If there are n possible values for each field, each arrangement can... (by JLBorges)
Multiple void functions with a string
 
Been attempting this for a couple hours now, just can't figure out how to get it done with 3 functions. In the main function i'm asking how many teddybears the ...
[6 replies] Last: Well, for example : #include <iostream> #include <string> using nam... (by Hanaka)
Vector passing from one class to another
 
So, I have a question. Let's say I have a vectorA (any vector) in Class A. I initialized it in ClassA.h, and declared the vectorA in ClassA.cpp I have to ad...
[2 replies] Last: Or you can make a class B method a friend of class A. 2 things to bear... (by gunnerfunner)
Enums
 
Hello guys, This is my first time when it comes to dealing with Enums so yea my codes might abit too dumb :S so, I have 2 enums of the follow type enu...
[1 reply] : #include <iostream> int main() { enum Region { A = 0, B, C, ... (by xismn)
Member Function Within a Member Function
 
I have this project I am working on, and I'm trying to implement a function within a function just to make the code nicer, since the embedded function needs to ...
[5 replies] Last: f3 and f4 are not used here, but I figured I should present them to h... (by integralfx)
Java to C++
 
I have a java code that needs to work in C++ This is what the code should do: Define a struct called "Car" with the following member variables:  Total...
[no replies]
Homework Problem: ofstreams and ifstreams
 
Hello, I have an assignment due tonight that needs to at least function. The assignment is to create a txt file and write a sentence in it. From there, the p...
[2 replies] Last: Thanks! That worked wonders. But I had to drop string line; in order... (by Cobalt Velvet)
Overflow-Error
 
I've a text of about 5000 words and want to count words and word lengths looking only at alphabetic characters. I tried to look at each char per string decidin...
[4 replies] Last: I thank you all for the well educated answers. Now that the problem is... (by alextmfk)
Merg sort
 
i did exactly what the pseudo code told me in the book introduction to algorithms and it didn't work there are three parts that i dont really understand 1-ho...
[2 replies] Last: heyy Andy, thanks for the great explination . however, in merge_sort(... (by zeroblank)
Passing by reference an array that has variables as elements
 
Hello everyone, So I have 6 variables a,b,c,d,e and f. They are all integers. Now I have a function that wants to change the values of these variables. I do...
[7 replies] Last: if its just names that are your issue, then the problem is so much eas... (by Jaybob66)
Assigning Intervals
 
Hi, I'm new here I'm also italian, soooo...sorry if I make some grammar mistakes. So, Can I assign a variable to an interval? For example: max=max<=31 or som...
[2 replies] Last: No, max<=31 will give a bool answer, you cant just assign that back to... (by Jaybob66)
Calling player stats from vector
 
Okay, so I have a player name vector within a class as well as a functioning register and login system that reads from files. (Ex: Allura.txt, or Bob.txt). User...
[3 replies] Last: By design, in your program, each class object has the entire vector of... (by gunnerfunner)
C++ if statement help
 
Before I get in to this I'd just like to say, please be mindful of technical explanations. I'm quite new to the language of C++ and my knowledge is fairly limit...
[6 replies] Last: @DigitalDaze One thing that is good here, is that you put the ci... (by Chervil)
November 2016 Pages: 1... 678910... 44
  Archived months: [oct2016] [dec2016]

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