Beginners - June 2014 (Page 33)

by samop
Assigning to a string from a function call
 
Hi, I'm stuck on something that's probably really simple. I've a function that returns a string value but when I try to assign it to a string variable it ...
[6 replies] Last: Oh, how embarrassing (but I did say "I'm stuck on something that's pro... (by samop)
Help about one program
 
Solved
[no replies]
Recursive
 
i am a sucker at this....can anyone tell me where the 30 comes from in the output for this function.not where but why i dont get it... int Test(int a, int ...
[3 replies] Last: [quote=helios]By the way, there are inputs for which the function does... (by a k n)
Finally a standard GUI library!
 
I was wondering why C++ has not a standard GUI library anyway.. Of course there are many good libraries out there to make very fancy GUIs (for example QT librar...
[9 replies] Last: There is no reason for such a library to be in the standard. It would ... (by NoXzema)
for loop error in cplusplus tutorial
 
Write your question here. // range-based for loop #include <iostream> #include <string> using namespace std; int main () { string str {"Hello!...
[3 replies] Last: Visual C++ 2010 is pre-C++11 so the code won't compile. The range for ... (by BHX)
by dday9
Return an array from a function
 
I'm not great with C++, I'm more of a VB.Net guy. However I am trying to start programming more with C++. What I'm currently trying to do is return an array of ...
[8 replies] Last: Alright, thank y'all so much. (by dday9)
Need help with Project(Part1)
 
Okay so I'm a newbie programmer and I have a project where I need to create two functions. In the main function, I have the user enter in 10 numbers. After the ...
[6 replies] Last: However, putting the constant gsize at the global scope firstly mean... (by Chervil)
recursive functions
 
This code is supposed to take a word that you enter and print back out in reverse so for example if you enter in "Mississippi" it prints out "ippississiM", also...
[1 reply] : int j = s.length(); wrd = word; if (wrd.length() < 0) // I d... (by keskiverto)
finding element in 2D array
 
Hi, I need some help with two dimensional arrays. I need to write a function that will find the element in data, like user enters name and number of colon and i...
[1 reply] : I presume that row k of the matrix (sc ) corresponds to the element k ... (by keskiverto)
wrong constructor called
 
I have the following code in main.cpp: String test ("abc"); test = "bob"; note: the String (with a capital S) is my own class at 'test =...
[3 replies] Last: Change the return type to String & to avoid the constructor call. (by helios)
Call class
 
Hi, How can I call a class in my main ???
[1 reply] : Look at this tutorial: http://www.cplusplus.com/doc/tutorial/classes/ (by closed account j3Rz8vqX)
Loading int from file.
 
I want to load the INT from the file which is a number. Can you please show me a code? This is the code I got but this error 268 C:\Dev-Cpp\Applications - Conso...
[5 replies] Last: Yeah, you overwritten the precious value you had retrieved from file w... (by closed account j3Rz8vqX)
Class Objects
 
When I enter 3 different presidents and their numbers/quotes into the for loop, it only displays the last entered president in all iterations of the display mem...
[2 replies] Last: As wildblue stated. A possible example with vectors: #include <iostr... (by closed account j3Rz8vqX)
How to read data from text file in same format as file?
 
Here is my information in my text file: Lily Grand 4622 C 32.00 10.50 Tony Stone 5014 A 43.00 7.25 Jessica Land 3311 B 20.00 10.15 Emily...
[4 replies] Last: There's a bit on the basics of arrays here. http://www.cplusplus.co... (by wildblue)
Compiler error: "expected identifier before numeric constant"
 
I am getting "error: expected identifier before numeric constant" at line 8 of some code. Line 8 doesn't have any numeric constants (just a class declaration) s...
[5 replies] Last: Oh, OK. I must have glossed over that in the tutorial (by WyntrHeart)
ATM code
 
So I need to make an ATM machine program. I used boolean for flags, if/else statements, and a do while, but I still can't get it to work. Here are some guide...
[2 replies] Last: I got it to work yaaay! (by Steakvid)
How to make a class with array member size determined via constructor? (1,2)
 
I am trying to make a class with a 2D array, the length of which is given in parameters of the constructor, so basically when I create an object called Screen, ...
[20 replies] Last: K thanks (by WyntrHeart)
Problem with error message / if else statements
 
I am writing a program to determine company's weekly payroll. Before I move on to the next step, I must fix a problem I am having. The error message still di...
[4 replies] Last: Okay, I removed the condition and it worked! (by MissPrimrose)
dynamic alocate pointer to pointer on array by dzury
 
dynamic alocate pointer to pointer on two dimensional array /* Convert Decimal to Binary */ int main() { int binary ; printf("Enter any ...
[no replies]
Reading lines one by one on notepad
 
I am making a saving system and for this reason, I need to read some number out of it, that's why. I want to get out the number from each line (y, x, z) and e...
[2 replies] Last: Top of the codding. int c; // chances int nn; // double chance int n... (by Private200)
June 2014 Pages: 1... 3132333435... 48
  Archived months: [may2014] [jul2014]

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