Beginners - January 2015 (Page 22)

Deleting contents in my array.
 
Hi, I have this problem. I want to initialize too the contents of the array made by the user. When I use delete array; it errors. How can I delete the conte...
[3 replies] Last: MikeyBoy is correct. you arent dynamically allocating memory for your ... (by mutexe)
don't know how to print with template
 
hi! i need to demonstrate this program by creating and printing Pair objects that contain five different kinds of pairs, such as <int,string> and <float,long>. ...
[3 replies] Last: Have I misunderstood the question? Pair <int, double> pa(123456, 32... (by tipaye)
to_string().c_str()
 
Could somebody explain the meaning of bold letters in below statement get_time(). to_string().c_str()
[2 replies] Last: http://en.cppreference.com/w/cpp/string/basic_string/to_string http:/... (by mutexe)
isupper and tolower
 
Why does this errors? I used structure and i want to display it with all lower case letters but it errors. I used #include<cstring> and the entries are all arra...
[12 replies] Last: Thank you for your help! I think i did it. :) (by Vandalism)
by sam37
Nested class test with string and const char* types
 
I am working on an API which uses nested classes and const char* members. I came across this issue when trying to understand about nested classes with a sample ...
[3 replies] Last: Thank you very much for your response MikeyBoy and MiiNiPaa now it mak... (by sam37)
Combine two program
 
hai, i tried to combine two programs into one.. in my first program it has one class object and main() and my second program it has only one main() i wa...
[11 replies] Last: I'll repost what I wrote in your other thread: It's almost certainly... (by MikeyBoy)
what does this line of code mean??
 
I think this is a function returning a bool, bool atEnd() const; but what does the "const" before the";" mean ?
[3 replies] Last: You have omitted essential context. It's a line from QString.h and ... (by skorefish)
How to search for missing semicolons for noobs
 
Hello, how do you programmers search for missing semicolons? I'm sorry if this question comes off as arrogant or silly. I was told by someone on a differe...
[4 replies] Last: some line error: expected ';' before ... without a line number? That... (by mutexe)
by Life24
Dynamic struct of array
 
Hi, I want choice dynamic size for array, and user can enter arbitrary size of n. Similar this. What i do? I don't like use pointer or any advanced code.(I need...
[8 replies] Last: Also, delete arr; (note the brackets) Your absolutely right, thx ;... (by skorefish)
dynamic allocate practice program
 
im practicing to allocated memory dynamically should i really need to check if the dynamic memory is successfully allocated everytime i allocate a new dynamic m...
[9 replies] Last: what do you mean by automatic option? The std::unique_ptr. Check ou... (by keskiverto)
Make a basic addition problem help
 
How to make a basic addition problem. I want the program to say enter a number 10 times. Like this enter a number..(x10) repeating that 10 times then the fina...
[1 reply] : Do not use number twice: as the loop index and for input. #include... (by coder777)
Handling exceptions
 
Hello, I am reading a C++ book, and am in the section of handling exceptions. I am wondering why the exception handler, when handling strings, must use a pointe...
[4 replies] Last: okay thank you. (by xenovia12)
About stringstream
 
I have 2 errors in this piece of code, namely "Error: incomplete type is not allowed" for the "info" words and "Error: no operator "<<" matches these operands" ...
[4 replies] Last: Thank you so much!!! I've been looking at my code for hours trying to... (by Bipolar Worlds)
Dynamic array of class objects
 
I can't fix this code, the program will not generate random numbers for the length and width of the rectangles. I was recently introduced to pointers so I'm not...
[1 reply] : In assignment, the variable on the left takes it's value from the expr... (by cire)
opencv webcam
 
i cant find where the program is targeting X86 systems error: opencv_world300d.lib(opencv_world300d.dll) : fatal error LNK1112: module machine type 'x64'...
[2 replies] Last: ok i set it up with 64 bit now but it says that the opencv_world300d.... (by kmtompkins)
Number of array elements from input file?
 
I would like to get an int from a file and use that as the number of elements when declaring an array. However using the code below it seems to want const numb...
[3 replies] Last: Ah okay got it. Thank you MiiNiPaa and Keene. (by bulba5aur)
Classes.
 
So I'm trying to make code for an assignment that asks for us to create an array with a random size between 10 and 20 filled with random ints between 1 and 10. ...
[1 reply] : 1) Your randomArr pointer is never initialized, so all operations wi... (by MiiNiPaa)
by qmnty
Make sleep function on game
 
Hello, I am beginners in C++ using Micros*ft Visual Studio Express 2010 How to check a game is running and make it sleep first before download update is fini...
[2 replies] Last: Check is the game running. And make it sleep first (by qmnty)
Accidental character input
 
I'm new to C++. A section of my current program is giving me a bit of a problem. The computer asks the user to input an answer (an integer) to a math equation, ...
[1 reply] : First things first, when posting, use the tags. Ok, well looking at ... (by Anthony5347)
by Irhcsa
Sloppy Calculator
 
It works without my loop but when I try to incorporate the loop it wont run. Anyone know where I'm messing up? I mainly want to type in 2 numbers and have...
[6 replies] Last: In the if statement. It works for addition and subtraction. (by Irhcsa)
January 2015 Pages: 1... 2021222324... 39
  Archived months: [dec2014] [feb2015]

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