General C++ Programming (Page 30)

How to prevent memory leak in this case?
Assuming I have a class A with construct: A(int a); vector<A *> vectorForA; for(i=0; i<10; i+...
[4 replies] Last: Thank you very much, cire. (by buddha87)
Problem when reading file in binary mode
I have encountered some problem when i tried to read the data using binary mode, which I cant read t...
[2 replies] Last: I know where's the problem, its my txt file. Thanks Chervil ^^ (by jiehang)
ASAP, please
Hi, i am trying to make a program that writes in a square board(which is an array bool ) given the ...
[4 replies] Last: You are right. Thank you for your help. Im going to put this problem a... (by MrGecko)
Saving a Large Array for Quick Reference
I need to store 15,000,000 sets of variables a 1000 x 15000 array, in a file. The only way I know ho...
[1 reply] : If your set of variables have the same size you can use a binary forma... (by Thomas1965)
C++ Data Structures
I see no question.
[3 replies] Last: Yeah, I saw that. I didn't want to add a post to the thread to draw m... (by MikeyBoy)
by lukew
Vector subscript out of range
Hi I have an algorithm which try's to find the "maximum distance" between two nodes. I have read ...
[1 reply] : use .size(), not .capacity() (by ne555)
Help Please ASAP
Can someone please give me some help. My instructor wants us to create a program using a flowchart w...
[3 replies] Last: And what, specifically, are you having trouble with? (by MikeyBoy)
by bjl311
Switch menu help
I'm struggling with a few errors on my switch menu. Whenever the user inputs valid numbers it doesn'...
[1 reply] : I put breaks on each of my cases No breaks on cases 2 and 3 More ... (by tipaye)
OpenGL - 2D Query
Morning, all :) I'm planning on making a simple 2D game. The game will be using OpenGL 3.2 for th...
[3 replies] Last: Thank you for the replies. Moschops, how do I specify screen co-ordi... (by Interlocked)
implement OOPS concept
i have created a program for System of banking process which is secured by login only STAFF and CUST...
[no replies]
passing vector to class constructor
I have a class that has a string, an int, and then a vector of doubles all members. my vector m...
[5 replies] Last: The same way as you pass any other class by reference. As Abstraction... (by MrHutch)
Sorted Linked List
Hi I'm trying to code a program to insert 12 integers in a linked list, sort them and then output th...
[2 replies] Last: (*newnode).num = number; Why not use the pointer operator(->) ... (by integralfx)
Displayed lines on a screen in a order
I need to create a program that reads the file, and displayed 3 lanes which have the top 3 greatest ...
[1 reply] : 1. Your 'points' is a std::string. Why? You do mention "numbers" ... ... (by keskiverto)
Help with finding lowest value in do while.
Hello, i have this problem that i want to know an answer to it and i can only solve it by using do w...
[1 reply] : A more complex condition: If the new value is smaller than the smalles... (by keskiverto)
help please!!
what is wrong with this statement int loopy = 1; do cout << "Body of Loop...
[2 replies] Last: You forgot the curly braces. Also in the while condition I gues you wa... (by Thomas1965)
i cant see my results
int result, a=0, b=1, c=5; result = a > 5 || b < 5; What value is stored in result?
[2 replies] Last: If the source type is bool, the value false is converted to zero and ... (by S G H)
null ptr test
Code snippet showing null pointer check if (!array)return . How does the expression (!array) work ...
[17 replies] Last: > but it was the implicit conversion to bool that allowed the expressi... (by JLBorges)
Read MySQL database table rows
Hello. So I have this C++ code: void mysql_do_ds_awards() { #ifdef USE_MYSQL char sql_cmd ; ...
[2 replies] Last: Take a look at this: (by coder777)
Block scope and Context of local variables
I recently came across some unusual code. I find it to be buggy at worst and risky at best. Any comm...
[4 replies] Last: > This particular compiler (tried with a few different versions of GCC... (by JLBorges)
finding x using loop
hello I'm a beginner and I've been trying to write a program that finds the approximate x in this eq...
[2 replies] Last: thank you so much :) (by sunny0902)
Pages: 1... 2829303132... 39
  Archived months: [mar2016]

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