General C++ Programming (Page 7)

Help! srand (time(0)); not working-- Random color picker
I have to write a program that selects a random color from an array. I used the srand (time(0)); sta...
[7 replies] Last: I used the srand (time(0)); statement but it still gives me the same... (by cire)
Algorithm producing wrong output
Can anyone tell me why my calculate function is producing a zero?I feel like it may have something t...
[1 reply] : You are using uninitialized data. M = new int[pouch_size + 1]; just... (by ne555)
Integer to String
So, I've managed to do this far and almost, almost done except for this one problem. The output sh...
[4 replies] Last: C++11: #include <string> int x = 72; std::string s = std::to_strin... (by Duoas)
Hi. How does 'string' differ from 'String' and 'const char *'?
[2 replies] Last: A 'const char *' is just a constant pointer to the memory location of ... (by Yay295)
Question about the term: "Translation Unit". Help me sound smart!
So this term, Translation Unit, has been coming up in my reading more and more often, either that or...
[4 replies] Last: @ jlb : Yeah, it's that second quote you have that threw me off, alon... (by Computergeek01)
open a thousand .dat files for input operations
Hi! I would like a piece of advice about a program that I'm writing: First part (that I can manage...
[12 replies] Last: p.s. the program (finally) works, the problem was the memory freeing (... (by Foxfire)
Rectangle class width/height problems because of floating point errors
Hi, I'm trying to write a game and for that I created a class to represent a rectangle for boundi...
[10 replies] Last: I just rewrote my code to use width and height instead of right and b... (by MikeyBoy)
by xystus
A string array... with more than 1 string?
How would i do this? Im trying to create an inventory but this just will not work, when i do it h...
[8 replies] Last: To answer your earlier question about vectors, not having to know the ... (by Computergeek01)
by newww0
generating integer array
Hi,i am new to c++ and i want to write a programm to generate an integer array. I keep getting the e...
[2 replies] Last: What compiler do you have ? No modern compiler will let you compile t... (by modoran)
splitting a string in c++
with respect to below string, i need to split it and store the values accordingly as below, P2P-DEV...
[6 replies] Last: Use something like this if your compiler does not support c++11: #inc... (by modoran)
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 ...
[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 faul...
[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 t...
[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 provi...
[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,...
[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 tr...
[26 replies] Last: 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 permiss...
[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....
[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 c...
[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]
Pages: 1... 56789... 38
  Archived months: [may2014]

Cannot post in this page. To post a new message, go to the first page.