Beginners - July 2016 (Page 4)

Friend functions?
 
A small code about friend functions. Why does it still say that a is private? #include <iostream> using namespace std; class Stud { int a; ...
[4 replies] Last: @jonsnoww I don't think you should be using friend functions for thes... (by TheIdeasMan)
Specifier
 
What is the specifier to specify long long integer with scanf? Thanks. An example of what I mean is this, but with type integer: int i; printf("%s \n", ...
[6 replies] Last: @Peter. Thanks. (by aurimas13)
Load variables from file and work with them
 
I read some threads about importing and displaying data from files, but didnt find a case of actually using imported data as function arguments. Especially not ...
[14 replies] Last: I see. I'll think about it. Thank you again. (by AterVulpes)
SFML - Sprite issue
 
I have a sprite sheet that has 4 animations with 4 frames each. The size of the .png is 128x192 so I believe each frame is 32x48 pixels spaced evenly. I have be...
[2 replies] Last: Legend mate. So the IntRect() third and fourth arguments are respecti... (by megatron 0)
Road to software engineering
 
Hello everyone,i just joined your community, and started learning c++ recently, i really like the language it seems very interesting.Well, my goal is said in th...
[no replies]
why allocate memory??
 
Hi I'm just finishing reading Alex Allains book and he doesn't give too much of examples on why and where we would allocate memory dynamically, so the questi...
[2 replies] Last: why would this line of code not work? new int returns int * while... (by coder777)
Magic Square Help
 
Hi, I created a magic square program to allow for a variable input of an odd value. However, I am getting the error ISO C++ forbids variable-size array `magic'...
[5 replies] Last: I heard additionally that such apps of life-critical system are runnin... (by closed account 48bpfSEw)
output issue please help
 
This is for a beginner computer science class. The prompt wants the matrix to have the 1 in the bottom center like this 11 18 25 2 9 10 12 19 21 ...
[no replies]
header files
 
Hi all! This is my first time using a header file and source code together. I am getting a external symbol error that I think might be due to using this method ...
[11 replies] Last: #include <iostream> #include <fstream> #include <iomanip> const int... (by closed account 48T7M4Gy)
C++ Vector class object pointer how to print
 
#include <iostream> #include <vector> using namespace std; class MyClass { public: int price; MyClass() { cin>>price; } }; class Ev...
[2 replies] Last: Does that help you? :) (by Naughty Albatross)
ignore
 
nvm.
[3 replies] Last: http://www.cplusplus.com/forum/general/195014/ (by closed account 48T7M4Gy)
How Would You Find The Number Of Times A Certain Array Element Repeats
 
I have a program that prints 25 random number between 3 and 7. It also reverses the array after. How would I find how many times the number 5 appears in the arr...
[4 replies] Last: Good to hear :) (by Naughty Albatross)
we
 
433434
[4 replies] Last: http://www.cplusplus.com/forum/general/195007/ You might need to help... (by closed account 48T7M4Gy)
How to make a dynamic array in my code using C-String pointers.
 
Hello all! I am working on an assignment but have run into some issues, on the very last day its due of course :( I was wondering if I could have someone take a...
[12 replies] Last: Start with a single loop and add an if() statement to count only the a... (by jlb)
by MAhmed
string`
 
Can someone tell me atleast 10 functions of string and a little method on how to use them? and what are each function's work? thanks
[4 replies] Last: Can someone tell me atleast 10 functions of string and a little metho... (by closed account E0p9LyTq)
How would I find the sum/average of an array of numbers
 
I have been writing a program that prints an array of random numbers and then its reverse. It then prints the min and max. Now, I am trying to find the sum and ...
[7 replies] Last: @Kemort Thanks, that fixed it! (by Austinomical)
by MAhmed
User defined function error
 
please check the code i am using this code for: when user give 2 inputs for example user gave 1 and 3 this this should run the loop using userdefined functio...
[6 replies] Last: int user (int a, int b) { int total = 0; for (int c = a; c <= b... (by Thomas1965)
IF command help
 
Hello, this is my first consultation ever on c++. :p I'm self learner so it's very hard to figure my code problems out without any consultation. ;/ I hope you w...
[4 replies] Last: Thank you for answers! But I have few questions more. When I input al... (by GEvaldas)
LNK1120 and LNK 2019 errors BMI program
 
I keep getting LNK2019 and LNK1120 errors...not sure whats going on. heres the assignment... Your Task: Write a class called “client”. Your client ...
[1 reply] : You seem to have a lot of extra semicolons in your code. You may want ... (by jlb)
C++ and math
 
Hey guys! I'm currently learing c++ and i really like it and i would like to make a software for Windows or Linux (it's probably not gonna relate to cryptograph...
[6 replies] Last: Thank you so much for your answer! Really appreciate that :) (by Welp12451)
July 2016 Pages: 123456... 30
  Archived months: [jun2016] [aug2016]

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