General C++ Programming - March 2013 (Page 20)

Priting Memory related Info
 
Hi, Is it possible to print memory related info in the code. i mean int main() { can i print memory consumed now int* i = new int can i print me...
[2 replies] Last: Getting resource usage is highly system dependent. A call to getrusa... (by tcs)
accumulate does not work with iterator?
 
Hi, I have the following code array<int, 5> a = {1, 3, 5, 7, 9}; int tage = 0; auto it = a.begin(); accumulate(it, it+3, tage); However, I d...
[2 replies] Last: Thanks! (by dekeenfrance)
MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
 
#include <Windows.h> #include <gl/glut.h> #include <gl/gl.h> #include <gl/glaux.h> //#pragma comment(lib,"opengl32.lib") //链接API相关连的opengl32....
[3 replies] Last: At which point in the program does it crash? Do you have any warnings ... (by S G H)
Recursion
 
Hi all, I'm new to the forums; hopefully this is the correct place to post this. I was hoping someone could shed some light on recursion. I understand what i...
[2 replies] Last: Good morning Stewbond, Really appreciate the quick response! Thank yo... (by gfunk999)
Which Book to Buy, C++ Primer 4th edition or 5th edition
 
Hi Everyone, I am an absolute beginner in C++ and right now I am going through the C programming language. With that in mind, please suggest me one of the bo...
[5 replies] Last: I own the 5th edition and I find it pretty good. All new stuff relate... (by mariostg)
Destructor for class that holds pointer to object
 
Lets say we have a class that holds a pointer member to another object. If I delete that pointer in the destructor I get an error (and I understand why). My que...
[5 replies] Last: cire's approach actually made me think of something interesting. I wo... (by Disch)
N++ issue
 
I'm working on a shooting program and it's required to run 1,000 times. As far I know, my code is correct but it doesn't actually run 1,000 times. It's more lik...
[4 replies] Last: Thank you! I changed my code around a little and it's functioning corr... (by nheath12)
Moving 2D array inside a 2D array
 
Hi guys, A while back, I had a question about this little stub program. http://www.cplusplus.com/forum/general/92801/ Now, I am trying to model "light...
[2 replies] Last: Thanks Coder777, I ran out of time today, but I will give what you s... (by toomanystars)
Polymorphism on class instance is not directly applicable to array of class instances
 
Below code produces run-time segmentation fault (core dumped) when execution reached line 53: delete array Code 1: #include <cstdlib> #include <ios...
[9 replies] Last: Thank you very much. This really help! I have another question posted... (by activecat)
qwea
 
asdqwasd
[no replies]
by Ryuuji
Getting Storage Bus Type(SCSI/ATA/ etc) before using IOCTL
 
Hi Guys, I can't find a way getting storage drives' bus type (SCSI/ATA/etc.) without or before sending commands using IOCTL. Can someone please help me an...
[no replies]
Entering valid user input!
 
Entering valid user input? Hello guys; I am wondering if you can help me. How can I write my simple program so if the user enters an invalid number, ...
[3 replies] Last: #include <iostream> #include <string> #include <limits> int getNum( ... (by cire)
by Jp P
Garbage Output?
 
I know what i'm doing wrong, i just don't have a solution and can't word it correctly to find the answer via google. Here's me code: struct Member { ...
[1 reply] : char Interests ;//<------problem You're right, it is a problem. T... (by cire)
by Yom
Creating a .h file
 
Help, I am a beginner with C++, taking a class right now. The lab this week is to create a user defined class and have it accesses in a seperate .h header fi...
[16 replies] Last: I finally figured out the answer to my question. There are two kinds o... (by Yom)
PLEASE HELP HELP HELP HOMEWORK
 
Please help me with these questions!!! Im sooo lost B) i) Suppose that we have this program fragment which is supposed to get the product of the number...
[12 replies] Last: Ok, for Part B, not too sure if I read the question correctly. int... (by osgwsy)
PLEASE HELP with functions and illegal breaks
 
I am suppose to make a program where the user inputs 3.50 for a twinkie using functions and i am lost. This is what i have. #include <iostream> using nam...
[1 reply] : total so far has to have a starting value when you call a function you... (by closed account Dy7SLyTq)
Function to determine if program should continue.
 
User inputs a value for x and a value for y, then I have this for loop output a series of dots in a vertical line which I then import into excel and create a ch...
[12 replies] Last: [quote=xkcd83]" Throw an exception, and execute the function in a try ... (by closed account zb0S216C)
Comma formatting
 
I'm having little trouble getting the numbers a user enters to be formatted appropriately. I can only use modolus and division for this im getting the first thr...
[2 replies] Last: At this point both, some guidance on how to approach it would be helpf... (by copre22)
Hellp
 
I am starting to learn C++ and i hawe realy shity profesor. I need help with this program if anyone can explain the parts i would be grateful Designing class...
[1 reply] : How about first reading about classes, and making a constructor. See h... (by xkcd83)
by coder1
Good Graph Sources
 
Hi, i have a test in c++ soon, and i need to study the graph theory and algorithms such as dijkstra's algorithm but when i search it on the internet it seems s...
[no replies]
March 2013 Pages: 1... 1819202122... 51
  Archived months: [feb2013] [apr2013]

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