Beginners - March 2014 (Page 55)

Can someone explain why this is the answer?
 
This question is which function in main would result in a error. The answer is ptr->fun3() - can someone explain why? class A { public : void fu...
[3 replies] Last: That's embarrassing. (by givemejavaback)
by Ram1
program that uses an integer array
 
Write a program that uses an integer array to store 12 test scores that a user enters. Then 1.Calculates the highest score 2.Use following formula to calc...
[6 replies] Last: @Uk Marine do not worry it happens! (by eyenrique)
2d Array from file
 
Hey guys im very new to C++ currently in university studying it but i am no where as good as i am at C#, well ive been trying to read in a txt file that has the...
[2 replies] Last: arrays are not the most convenient data structures in C++, you'd be be... (by Cubbi)
Pointer Address == array element?
 
What I want to happen in my code below is rather than int p = *search(Which I explain below is actually equal to ascii value of "F", so 70). I want p to be equa...
[2 replies] Last: Thank you! (by JRimmer)
Value returning function
 
So I was wondering how would you go about returning a value from one function and using it another. Say i have function - int x( int z)(just a random code) an...
[1 reply] : You just pass it to the second function like anything else. (by firedraco)
Command Line Arguments, Weird Results
 
Hello, I'm working on an assignment to create a program that takes in 4 test grades and returns a letter grade. The first two grades are 0-10, the second two ar...
[4 replies] Last: Thanks so much! It works fine now. To anyone else who might come acros... (by hinesro)
How to make the file operational
 
As you can see im trying to make the example.txt file mathematical operational. Cause for example in the text file it says there "2+3" then i use getline to get...
[1 reply] : you will have to parse the string and do the operations yourself. if... (by giblit)
Searching array by value
 
How can I find arrays index by value? for example: int box = a,array ={b,a}; One way would be: for(int i=0;i<2;i++){ if ( box == array ) ...
[1 reply] : std::find can search arrays: http://www.cplusplus.com/reference/algori... (by Cubbi)
Screen wont stay open
 
No errors found but whenever i compile it. the screens just opens and close suddenly. #include <fstream> #include <iostream> using namespace std; i...
[2 replies] Last: Ugh I wouldn't really suggest using conio to keep open the console as ... (by giblit)
passing array to calling function
 
need help in passing an array that was initialized within a function...below is a code snipet. can someone please help. I am successful in creating the array in...
[no replies]
how to decalre namespace?
 
i know how to declare + definite but how can i only declare it? if i declare and definite in one cpp file, i can do it... but i want to declare a namespace i...
[2 replies] Last: yah i know about your code, my question was if its allowed for me to d... (by SrgjanLDTeam)
by mlor3
How to get code to update price (accumulate) when it runs the loop over again?
 
The price resets when the code re-loops. Is there a way I can get the price to accumulate instead of resetting back to the start? Here is the code. #include ...
[no replies]
by enemy
One just indentation topic
 
Hello! Please, is the first function ok indentated now? The problem is I saw many different types and I even don't know which of them are right and which not, s...
[2 replies] Last: Thanks, MikeBoy!:) Better now ( I "tidied" it a little!) What is the... (by enemy)
Help Finding The Max value
 
Hi everyone, I want to know how we can make the program print the the max value from several data that user have inputed, for example I have the user input 5 in...
[2 replies] Last: Thanks for the explanation, although I still did not use my friend's ... (by LuminaChen)
by enemy
is sth wrong with cout I do nt see???
 
Please, does someone see the error? It is marked here: if (a>3){cout<<f4()<<endl;}; and it goes for <<??? (couldnn't remember because pc crashed!) Many thanks...
[2 replies] Last: BIG THANKS!!! (by enemy)
by Drone
My wish fountain is greedy
 
Write your question here. Hi,I'm really new to programming and c++ is the language I chose to get started. I'm having a great time learning this language and ...
[4 replies] Last: Remember, number = 1 assigns the value 1 to the variable "number", w... (by fafner)
Linux re-direction
 
Hello All, Could somebody help with writing a program. I am trying to create a program which performs simple fraction arithmetic, EG: 3/5 + 1/5 = x 12...
[1 reply] : It's generally not a good idea to ask an open question like this, with... (by fafner)
by renrew
If else statement
 
I only have one last problem before I complete my c++ project. I need to make a program which shows the review, to buy, availability of the product and will ask...
[3 replies] Last: Nvm. Already done it. Thanks for the help! :) (by renrew)
Linked list
 
So I have linked list and function which deletes element if next element is bigger, so my code is working but its not working with first element, in the comment...
[1 reply] : You are passing null pointers to your function. Then you dereference t... (by Smac89)
What is wrong? Error: expected ';' before string constant...
 
i know i should not put help in the title but: i have looked every where, all people having the same issue had it resolved, though i could not see whats wrong ...
[5 replies] Last: solved my problem, thank you anyway (by SmallButPowerful)
March 2014 Pages: 1... 5354555657... 79
  Archived months: [feb2014] [apr2014]

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