General C++ Programming - July 2014 (Page 15)

C++ (memory allocation to an array)
 
1) int *a=new int 2) int a can anybody tell the exact differences in these two types of methods of allocating memory for an array ? When does 1st method is ...
[3 replies] Last: thanks @Horscht and @Computergeek01.Also @Horscht example you gave is ... (by ankur12106037)
Segmentation Fault Help
 
I know this is a longshot, but I'm brand new to C++, and my code keeps giving me a segmentation fault. I don't know much about using pointers so I feel like tha...
[8 replies] Last: ¿your point? `new_array' only holds 2 integers, when you do new_arra... (by ne555)
storing strings to a vector
 
Hi, I'm fairly new to vectors and I'm having trouble storing a string in a vector. I keep getting the errors in lines 51-54: no suitable constructor exist to c...
[6 replies] Last: Worked like a charm. Thanks very much! (by tybalttheappleEater)
Help with function overloading
 
I understand the general concept of function overloading but I am at a loss right now. Let me provide you with the background information and where I am confus...
[6 replies] Last: yes that helped a lot. What i did was did exactly as you said and jus... (by RobHubbard)
help with vectors in a class file
 
Hi, i keep getting error C2664: 'void std::vector<_Ty>::push_back(std::basic_string<_Elem,_Traits,_Alloc> &&)' : cannot convert parameter 1 using the code: ...
[6 replies] Last: ah ok thanks solved it by using an iterator: string Movie::toString ... (by tybalttheappleEater)
by Manga
game dev help (1,2)
 
Hello all, I recently upgraded my compilier to visual studio 2013 express and have been having trouble ever since. I am trying to use sfml but when I comp...
[26 replies] Last: https://dl.dropboxusercontent.com/u/88413086/SFML-2.1-VS2013-RC.rar T... (by pnoid)
by jwb1
Permission Denied Error
 
Hey, I'm new to C++ and keep getting an error i wondered anyone could help with. I get a permission denied and id returned 1 exit status, the code is fine a...
[4 replies] Last: Just detaching the debugger or stopping the debuggee from the debugger... (by helios)
Random Number Generator
 
Hey guys, I am creating a random number generator and have run into a problem with my do while loop. it continually prints one of the lines of output infinitely...
[7 replies] Last: try to put 1 2 cout << "Guess A Number Between 1 and 100: "; cin >... (by mclemmon)
My Program Got Problem In Calculating (1)
 
My program got problem while calculating, it is about ordering drink, but each time when I want to calculate, it will show 0 in the result, can anyone helo me t...
[8 replies] Last: Thank you for answering again! (by wangshengwei95)
Rolodex and class functions using vectors
 
Are there any examples of this kind of code
[no replies]
Fibonacci sum problem
 
Question->http://www.spoj.com/problems/FIBOSUM/ Basically question is to find the sum of fibonacci numbers starting from N to M I did this question using the...
[4 replies] Last: thanks @helios this generalisation for sum to n number did help me and... (by ankur12106037)
by abc1
data types
 
Hi, I am not understanding the minimal and maximum range of data types. For example:- integer variable can store values -32768 to 32767, characte...
[10 replies] Last: Thanks NT3 & Chervil, What are signed and unsigned integer and si... (by abc1)
VGA Graphics Mode register VS Sequencer Memory Mode register?
 
I notice that both register have data concerning Odd/even VS planar memory mode (by the CPU accessing the area between 0xA0000-0xBFFFF). Graphics Mode Regist...
[no replies]
Cannot understand what is required from me in this assigment
 
My assignment: Implement and use the Stack Class to check for balancing of enclosure symbols: Given a text file containing a sequence of characters, develo...
[3 replies] Last: Thats what I thought. Thank You!!! (by Andrew Booth)
What is c++ graphics
 
I have been doing c++ for some time now and i have completed some tutorials online. Recently i was looking for exercises on c++ and i found a great article with...
[4 replies] Last: Sanilk21, Thanks a lot, you really helped me. i'll do my best! (by whiteReve)
My Program Calculating Problem (2)
 
Another calculating problem, this time is about the sinh x, cosh x and tanh x function, the formula given is : sinh x = (e^x - e^(-x))/2 cosh x = (e^x + e^(-x))...
[6 replies] Last: Thank you for answering (by wangshengwei95)
Deallocating an array
 
Hi all. I an new on this forum. I have a little problem when i try to deallocate an array. I give the size of the array, i introduce the elements, prints t...
[1 reply] : 1. A malloc() call must be paired with a free() call. A usage of new ... (by helios)
pointer help
 
Having a problem getting these pointers to work. Not sure what im doing wrong, any help is appreciated. The code keeps creating a head in the linklist inste...
[2 replies] Last: That is to keep head at the head of the list. The input file contains ... (by elite zero)
Object Vector Issues
 
Hello, I am currently having issues with a program I am working on that uses vectors of objects. I have a class Table that includes a bool isAvailable. Then I h...
[10 replies] Last: No I just want to be able to access the first available one. Thanks ev... (by Pi Lord)
Array of ClassObjects
 
Hi all and exuse me if this topic can has the same argument of another one! It's very important for me to ask you about a stupid thing. I never use this for...
[4 replies] Last: i've something like that: template <typename T> class TMatrix { ... (by Mexonius)
July 2014 Pages: 1... 1314151617... 26
  Archived months: [jun2014] [aug2014]

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