Beginners - February 2016 (Page 33)

Array in C++ - Beginners Help
 
Hi, I'm having some doubts about sum in arrays. --> As far as I know, to sum values of collumns the array has to be an INT: int v_array ; In this examp...
[3 replies] Last: Hi, When using any of the scanf functions, make use of it's return ... (by TheIdeasMan)
no extern declaration of an intance possible?
 
Hi I want to create an global object of a class, is this possible? for a normal primitv type i can just declaire it as extern int a; But if i ...
[9 replies] Last: @ Jensdvvgsr Can I ask why do you want a global instance of your cla... (by TheIdeasMan)
if/else question
 
Hello, I'm experimenting with if statements and have encountered something I don't understand. I don't understand why the program doesn't execute else when I e...
[7 replies] Last: It is not quite clear what the the operator>> does in case of an error... (by coder777)
getting the mode in a sorted array
 
i'm stuck on how to get the mode of an array after sorting them out. #include<iostream> using namespace std; int ascendingOrder(); int descendingOrder(...
[2 replies] Last: Your sorting functions don't return anything, they should be void. You... (by naaissus)
Problem with using a switch()
 
So I am able to get my code working, but on void RollDiceAndMove(), I cannot seem to get my code to make a new position (line 104) and sending it back to the wh...
[2 replies] Last: Hi, Some thoughts: line 10 : Functions should only do 1 conceptual ... (by TheIdeasMan)
C++ Do-While Issue
 
Hello Everyone, I Was Asked To Make A Basic Database,Everything Works Okay Untill The Do-While Part,The While Part Doesn't Get Executed. Any Suggestions On How ...
[4 replies] Last: Hi, There are a bunch of things I would change: C++ include files do... (by TheIdeasMan)
by rain
error adding symbols: Archive has no index; run ranlib to add one
 
Hello I have problem when I try to use my library. rain@rain /harjutus $ make test g++ -Wall -std=c++11 -Iinclude -c tests/geometrytest.cpp -o obj/geometryte...
[4 replies] Last: Hi, Just wanted to reiterate this: http://www.cplusplus.com/forum/b... (by TheIdeasMan)
Can someone check my code and help me with improving it please
 
Does the code below look right? Also how do I do testing for this code. I need to : Include testing of the various calculations and also of the overall behavi...
[4 replies] Last: HI, I had these compile errors: 4:7: warning: ISO C++ forbids decla... (by TheIdeasMan)
by a1234d
uber c++ noob needing simple code
 
Hello, I am very new to the whole C++ concept and am just trying to write a simple program. All I need is this: -repeatedly ask the user for a number between...
[2 replies] Last: Thanks! Works like a charm..can't believe I didn't think of this! (by a1234d)
Issues learning C++
 
Alright ill start off by saying who i am. My name is Patrick im 28 and i have been trying to learn C++ for sometime now. I have about 2-3books like Beginning C+...
[4 replies] Last: A tour of c++ by Bjarne Stroustrup is probably the best book for begin... (by TarikNeaj)
by dn90
Imitating a vector's constructor?
 
.......
[3 replies] Last: How can I write it so that if the chain isn't instantiated with a val... (by cire)
Friend function wont recognize privates members
 
For some reason in my friend function AddUp, it is not recognizing my private members. Any ideas? Thanks guys #include <iostream> using namespace std; ...
[1 reply] : friend Rational Add u p(Rational first, Rational second); ... (by cire)
classes
 
I don't know what the error is. ./MemberType.h:23:5: error: missing return type for function 'Membertype'; did you mean the constructor name 'MemberType'? ...
[1 reply] : Do you expect us to tell you what is wrong in your code without being ... (by TarikNeaj)
Please HELP!
 
Hello! Can you help me please? I have a problem with my program, worked for school. I have to do a program that display negative and positive numbers from a fi...
[10 replies] Last: Thank you so much :D (by klemen1999)
When do you not use #include <iostream>, using namescape std and int main()?
 
I've been programming for a week now and I've always used #include <iostream>, using namescape std, and int main(). so when do you not use them? in what instanc...
[3 replies] Last: > Earlier versions of C++ did not have namespaces(...) When they were ... (by ne555)
by basedg
Random numbers and if-else statements
 
okay so the program works but I need the computer to pick the numbers not the user. At this point, the program is asking the user to input the number and then i...
[4 replies] Last: [quote=newatthis]Hey admkrk srand(static_cast<signed int>(time(0)))... (by AbstractionAnon)
union error
 
Hi When I uncomment the union anonymous struct the code won't compile. Any ideas anyone? #include <iostream> #include <string> int main() { s...
[6 replies] Last: yes, category combined with a new attribute inWarehouse bool, which I ... (by bluefrog)
User defined functions
 
Hi, I am having a problem with one of my tasks. I am asked to find and display the time required to mow the grass around a house. The house has a square shape a...
[4 replies] Last: It helped. Thank you very much. (by frantzyk)
How to stop access to program if login is failed
 
How to stop access to program if login is failed, like after the third try i attempt, stop the entire program( make the next line appear only if login is succes...
[3 replies] Last: hey thanks tarikneaj, i got it! (by firedragon1)
Structs and assignment operator / constructor
 
In this example, how is it possible that a0 and a1 are not identical? struct A{ A(){/*allows declaration of non-pointer type w/o args; does not actually...
[2 replies] Last: What I meant was declare an A instead of a A*. "A a0;" wouldn't be val... (by DrZoidberg)
February 2016 Pages: 1... 3132333435... 46
  Archived months: [jan2016] [mar2016]

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