Beginners - July 2014 (Page 14)

by CDavis
pass by ref using Dynamic allocation
 
So we are using dynamic allocation now with pass by reference and I was starting to understand pass by ref but he wants me to pass by an allocated feature to pr...
[2 replies] Last: pass by ref is likely, function : void printCat(CAT &cat) { //y... (by lsk)
A predicate sample?
 
Can someone whats wrong tell me whats wrong with this code void Generic_algorithm::Predicates(){ string word1 = "Isaac", word2 = "newton"; bool aw = isS...
[12 replies] Last: Hi, Thanks its all working now. Thank you for helping (by procastination)
Homework Problem
 
I'm a beginner in C++ and I already feel lost. My teacher assigned us this problem: Create a Static 2D Array on the Stack to hold a set of four test scores f...
[11 replies] Last: [quote=Undefined95]My problem now is just getting the data from my fil... (by Catfish666)
namespace
 
im creating header file. what code should i use if i want my header file use using namespace . i mean i want to change the "std" into other. ex: using na...
[8 replies] Last: Hehe I see im just confused thank you (by xenovia12)
by abc1
increment operator
 
int i=20 cout<<i<<i++<<++i; what will be the output value of i?
[7 replies] Last: I see... in the 2nd snippet in line 8 it storing the new value of i an... (by xenovia12)
How to add 1 to a variable when a if statement is sufficed
 
Write your question here. currently I have this code written it all seems to be in order other than I am unable to add 1 to a variable when two variable equal e...
[6 replies] Last: It's very easy to find if you try to do, just google once, btw, thi... (by lsk)
Problem with Inventory class
 
Hello. Basically, I am attempting to make an inventory class for a text game and I am getting a single error, and I really cannot pinpoint the problem. It is, a...
[3 replies] Last: Resident Biscuit: Invalid operands to binary expression, problem with:... (by nrgbros)
by Ganado
Substr exception, pos string length
 
In the substr documentation it says: http://www.cplusplus.com/reference/string/string/substr/ string substr (size_t pos = 0, size_t len = npos) const; I...
[2 replies] Last: Wow, so it says it right there... an empty string. I thought I had rea... (by Ganado)
need some help with do/while
 
Hello, guys can anyone help me to make a program with do/while that print how many years an investment will become double or more investment= 750000 and int...
[1 reply] : Search up on interest calculation, usually here you should have some f... (by Ganado)
by wharp2
Populating arrays from files. (1,2)
 
So I seem to be confused on how to populate an array (2D and an array on the heap) here is what I am suppose to do: Create a Static 2D Array on the Stack to ho...
[22 replies] Last: No that is very helpful I am going to see what I can do with this. (by wharp2)
by xx1182
About random_device
 
I'm starting to use the new c++11 library. And i can't understand this function. It says it will get a number from a random device. And if it is not presen...
[7 replies] Last: Ooo, that's why! Do you know, some implementation rather than visual s... (by xx1182)
converting Binary Tree from sequential representation to linked representtion
 
Does anyone have an efficient way of doing this. I just want to maintain the structure of the sequential representation in the linked representation - this i...
[no replies]
error with #define & array output
 
last night i was able to display data from a text file in rows and columns using this code #include <vector> #include <iostream> #include <string> #...
[4 replies] Last: Okay thank you. summer class got ahead of me fast. going to look this ... (by blankpat)
Beginner programmer in need of assistance
 
I'm in an introductory programming class. We learning C++ and I have program that prints out the written version a number 0-999(i.e. enter 6 and the program pri...
[4 replies] Last: thanks discofire. that helped a lot. The changing the index in the ge... (by handoftheking)
Range of Long long int in c++
 
#include <iostream> int main () { long long int n=10000000000; // 9223372036854775801 cout<<n<<endl; return 0; } This code shows error message a...
[7 replies] Last: No, It is fixed now. (by newbie456)
Array problem -- error
 
When I compile this program, I'm getting the error that salesArray is undefined in main(). I am not sure what else to do. this is not a complete program, this i...
[3 replies] Last: You're calling functions in main that haven't been defined yet (you ju... (by wildblue)
How to use while(true) loop to write a program like this:
 
How to use while(true) loop to write a program like this: Welcome to My Number Guessing Game. I have a number in mind and you have to guess it. In your i...
[1 reply] : It seems like you want to loop while the guess is wrong not an infinit... (by giblit)
by yepMe
Reference problem
 
Write a function that takes pointer argument, modifies what the pointer points and then returns the destination of the pointer as a reference. #include...
[1 reply] : These instructions are really weird, but how I interpret them is like:... (by ResidentBiscuit)
How to use while (true) loop to write a program like this:
 
How to use while (true) loop to write a program like this: Welcome to My Number Guessing Game. I have a number in mind and you have to guess it. In your in...
[no replies]
by henock
How to display unicode characters in console application
 
Hello everyone, is there a way to display unicode characters in my console application? Am using Code::Blocks Thanks!!
[8 replies] Last: On windows std::wcout does not work as expected if you are using alone... (by modoran)
July 2014 Pages: 1... 1213141516... 43
  Archived months: [jun2014] [aug2014]

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