Beginners - April 2014 (Page 5)

by Ace94
Can anyone help me with a phonebook code
 
The program compiles fine, but when I run it it doesn't print out the number from the .dat Can anyone help me? #include <iostream> #include <istream> ...
[1 reply] : cout << searchName << "'s number is: " << number << endl; // Outputs ... (by nvrmnd)
by wolfv
undefined reference to function
 
Why does the following code get link error "undefined reference to" function? I copied the lines into a single file and it worked. So maybe there is something...
[2 replies] Last: Thanks Zhuge, that did the trick. (by wolfv)
by Polyp
New to programming
 
I have just now downloaded the C++ IDE and compiler Code Blocks to learn some programming (interested in pursuing a career out of it). Well I started with the s...
[5 replies] Last: Once again thanks illusionist. I have a lot of reading to do but it's ... (by Polyp)
by gabloo
Creating a tree with double pointer and structure
 
I am trying to create a tree. The basic idea is whenever I see '+', '-', '/' or '*', that variable become the parent of the main tree. For example, if user inpu...
[no replies]
by nvrmnd
clang linker error
 
compiles fine with g++ -std=c++11 #include <iostream> struct X { static constexpr const char* STRINGS = { "blah" // ... }...
[3 replies] Last: What exactly are you trying to do? Print a string that says "blah"? ... (by nvrmnd)
by Mido14
Dymanic Array Function
 
A program to calculate students grades.the user enter number of subjects and number of students then create 2D array of type Double for them.the user enter th...
[1 reply] : I don't know everything thats wrong here but looking over the code the... (by Void life)
by wolfv
inheritance question
 
I am stuck on this little problem. I appreciate any help you could provide. Class B inherits from class A. What is the syntax for private variables if they...
[10 replies] Last: You are right. I will move the variables to protected in base class. ... (by wolfv)
Why I have a segmentation fautl?
 
Could anybody help me with this code?, because i have problemsofsegmentation faultnut i don't understand why. Thanks #include <iostream> #include ...
[7 replies] Last: ok thanks , that was my error . It has been solved (by alejandrojimenez)
by Mido14
Dymanic Array Question
 
A program to calculate students grades.the user enter number of subjects and number of students then create 2D array of type Double for them.the user enter t...
[10 replies] Last: OK , I'll do that Thank You and good night :) (by Mido14)
Decomposition Powers Three
 
So I am trying to write a program that produces the decomposition of an integer using powers of three which are: 1, 3, 9, 27, and 81. example: 1 = 1 2 = ...
[9 replies] Last: You may want to create your own thread. Anyways, It would pretty much ... (by giblit)
Disallowing an option from repeating itself?
 
Hello again, im writing a program where there are a number of cases which are constantly repeated in a do-while loop until the user decides to end the program, ...
[5 replies] Last: Look at the following modified code and compare. The code I suggeste... (by Codermik)
Iterators
 
This question is about iterators. I declare an iterator in a code and use it for printing some conatiner class object like a list for example. Then I change the...
[3 replies] Last: You never reset your iterators to the beginning of the container. Aft... (by MrHutch)
Accessing the previous and next elements through a std::list iterator
 
Is there a simple way to get iterators to the elements on either side of that pointed to (?) by a std::list iterator ? I recently did this: std::list<T> LT...
[4 replies] Last: [quote=cire]In both cases, one should know the iterator will be valid ... (by closed account D80DSL3A)
Writing name out horizontally using an asterisk?
 
I do not know anything about C++ programming and my professor is asking us to write our name out horizontally using the asterisk "*". I do not know how to do ...
[3 replies] Last: Hey if you post your name that you need done, I can give this a whirl.... (by Irhcsa)
by Havel
no operator "<<" matches these operands
 
Hello, I am trying to write a simple program that demonstrates the use of a structure in an assignment. I keep getting the error no operator "<<" matches these ...
[2 replies] Last: Oh I see, so I need to use the print_bar function outside of my cout s... (by Havel)
by magyar
Please help with classes!
 
Hello, I am trying to use classes for the first time. I have 3 files: a header file that defines the class, a cpp file that defines the member-functions, an...
[2 replies] Last: Line 139: get_item_name is a function name (pointer). Since item_nam... (by AbstractionAnon)
by Pg0715
trying to get the pin number and asking for password
 
I need to compile a C++ program that simulates the authentication process. Store an actual PIN number in your program. The program should use an array to assign...
[3 replies] Last: http://www.asciitable.com/ Visit this page. It is what Zhuge was tell... (by closed account 2UD8vCM9)
Arrays
 
This code is suppose to output: str1=abcd str2=efg strlen(str1)=4 strlen(str2)=3 str1=efg str1=efgefg strcmp(str1, str2)=101 strcmp(str2, "efh")=-1 str...
[1 reply] : Line 39: Remove the ; Line 41: You will only reach this statemen... (by AbstractionAnon)
Expected '}' before 'else'
 
Okay, since the last I posted here, I have started a new project, A text based adventure. A simple one. Anyways look at the code and see whats wrong. c2 is alre...
[2 replies] Last: Thanks Wildblue didn't see that (by TheAnarchist)
Simple array question
 
Hello, I'm new to c++ and I'm having a play around with arrays and I'm trying to figure something out. For this little game I'm trying to have it so that a ra...
[4 replies] Last: That's great guys =) I'll have a bit of a play around with all that. ... (by brokenmachine85)
April 2014 Pages: 1... 34567... 67
  Archived months: [mar2014] [may2014]

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