Beginners - February 2014 (Page 41)

Codeblocks Help! Unqualified ID!
 
Basically I have to write arithmetic functions in codeblocks , basic stuff. I'm a starter in C++, this is for my class. Issue is, I have to just input differen...
[6 replies] Last: look here for info on functions: http://www.cplusplus.com/doc/tutorial... (by Cronnoc)
by gghf
terminating the loop with a negative number
 
I am making a function in a class where it asks the user to enter in numbers and to enter in a -1 when you are done with the list. I used the code below. The pr...
[4 replies] Last: are allowed negative numbers? what if -1 is part of the set of numbe... (by eyenrique)
Naive recursion no output
 
This function is supposed to take a base number and exponent and calculate the total. The syntax is all fine, but the problem is that no output comes out when I...
[8 replies] Last: Yes!! It worked. Thank you so much guys, I really appreciate it! (by fizanimtiaz93)
Count all the printable characters in a text file
 
I'm writing a program that counts each printable character (ASCII 32-126)using an array and outputs the count for each character. The output will only be the ch...
[1 reply] : First of all, you're accessing out-of-bounds elements on lines 21 and ... (by xismn)
C++ Classes Proper Syntax
 
Hello, I am currently trying to learn classes in C++. I came across this piece of code today, but I am confused about its syntax. If you look at line 10, it say...
[2 replies] Last: Member initialization. C++ syntax. http://www.informit.com/articles/... (by keskiverto)
by kimi86
assessing a variable from some other class
 
Hi Again all, Please look into my package structure below. I am trying to access a variable of Parser class from callsomemethod() method of a different class. ...
[3 replies] Last: thanks.. it worked:) (by kimi86)
What does &= do?
 
Hi I am working on some simple computer vision stuff and bumped into this &= assignment. However googling &= sucks. What does this &= do in this case? back...
[1 reply] : &= is the "assignment by bitwise AND" operator. a &= b; // same as... (by Catfish666)
solved . .
 
t..
[1 reply] : use std::unordered_map http://en.cppreference.com/w/cpp/container/unor... (by Smac89)
Error in Homework #Help
 
I was testing it to the if(grade>=80) if(grade<90) and it worked so I just rushed the rest since it's basically this with the number...
[4 replies] Last: lols I was refreshing this page for a while then I just went over to s... (by GaryTheChallenger)
Help finding largest number in loop
 
I usually don't post like this but I'm new to C and I've been stuck on this for so long its frustrating. The program needs to be able to loop and calculate the ...
[2 replies] Last: I don't know why I didn't realize that, thanks for the help. (by sunvsrhinovirus)
Implementing graphs in C++
 
Hello friends I am just a beginner in C++ and I need to construct a graph data structure using adjacency list. The graph has weights on both nodes and edges....
[1 reply] : http://www.cplusplus.com/forum/beginner/118340/ Alternatively, you ca... (by Smac89)
do while loop won't stop for input
 
This program is supposed to accept only positive integers. If a negative integer is entered, I want it to produce an error message and reprompt the user for inp...
[1 reply] : Apart from the missing curly braces to end the switch statement (copy-... (by Smac89)
Passing constant object by reference discards qualifiers error
 
Hi All, I'm hoping someone can help me with this error and what I am doing wrong, I've spent an entire day trying to get to grips with it but concede I need he...
[2 replies] Last: Hi Computergeek, thank you for taking a look, You got me trying again ... (by browncpp)
Translate one string to another
 
My assignment is relatively simple-- I receive an input in one "language" and must output it in another. However, it becomes much more tricky because one charac...
[2 replies] Last: To take one string and evaluate it "one character at a time", you make... (by Smac89)
Overloading Operators +
 
Using an overloading operator my instructor wants us to do the following. B = A + C; Where B, A and C are all objects. I believe she wants us to accom...
[3 replies] Last: Thanks for the replies! I've made adjustments to my code so the I'm p... (by JRimmer)
New lines in binary file.
 
I have a program that reads and writes data to binary a binary file. However when I open it up with a text editor I see one long line. However other binary file...
[3 replies] Last: The newline characters are there, they just aren't read as newline cha... (by IWishIKnew)
Problem when two classes use each other!
 
In the following code class A has a method witch has a parameter an object of class B. Class B has also a method with a parameter an object of class A. The pr...
[4 replies] Last: Thanks a LOT! (by nikosxatz)
stringstream
 
Hello World. I want to ask how to get the full string from ss to b. And what make exactly stringstream? Is it something like a pointer? Can I delete it when I h...
[9 replies] Last: Thank you. (by rizaado)
pointer to the array of a struct
 
Am still pretty new to all this and being a very mature student the old brains cells seem to work much slower!! My program needs to 1. create a pointer to po...
[2 replies] Last: thanks for the reply - all sorted now (by ukaturner)
LInked List and Stack
 
Hey guys, I have alot of problems implementing the Stack as a Linked List. I cannot seem to overload the ostream operator correctly.It says that the Node was...
[no replies]
February 2014 Pages: 1... 3940414243... 60
  Archived months: [jan2014] [mar2014]

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