
please wait
by buddha87
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++) { vectorForA.push_back(new A(i)); } later, if I ... |
Apr 14, 2016 at 3:06am
[4 replies] Last: Thank you very much, cire. (by buddha87)
|
by jiehang
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 the data that I wanted. //this is my code #include <iostr... |
Apr 14, 2016 at 1:40am
[2 replies] Last: I know where's the problem, its my txt file. Thanks Chervil ^^ (by jiehang)
|
by MrGecko
ASAP, please
|
Hi, i am trying to make a program that writes in a square board(which is an array bool ) given the instructions saved in a string . Any ideas? How could it be... |
Apr 13, 2016 at 7:44pm
[4 replies] Last: You are right. Thank you for your help. Im going to put this problem a... (by MrGecko)
|
by TestZombie
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 how is to just save if all with fstream into a text file, this... |
Apr 13, 2016 at 3:16pm
[1 reply] : If your set of variables have the same size you can use a binary forma... (by Thomas1965)
|
by keskiverto
C++ Data Structures
|
I see no question. |
Apr 13, 2016 at 2:44pm
[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 each node from the file and that works. However, when the pr... |
Apr 13, 2016 at 1:33pm
[1 reply] : use .size(), not .capacity() (by ne555)
|
by chaselan14
Help Please ASAP
|
Can someone please give me some help. My instructor wants us to create a program using a flowchart which he has given. He expects to learn how to create them by... |
Apr 13, 2016 at 11:25am
[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't break. I put breaks on each of my cases and i can't get it... |
Apr 13, 2016 at 9:57am
[1 reply] : I put breaks on each of my cases No breaks on cases 2 and 3 More ... (by tipaye)
|
by Interlocked
OpenGL - 2D Query
|
Morning, all :) I'm planning on making a simple 2D game. The game will be using OpenGL 3.2 for the rendering. After some research, I found that glVertex3i( ... |
Apr 13, 2016 at 9:23am
[3 replies] Last: Thank you for the replies. Moschops, how do I specify screen co-ordi... (by Interlocked)
|
by anilsoni7
implement OOPS concept
|
i have created a program for System of banking process which is secured by login only STAFF and CUSTOMER can access but OOPS concepts are not implemented much ... |
Apr 13, 2016 at 8:36am
[no replies]
|
by chamburger
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 member is vector<double> sales; my constructor is mycl... |
Apr 13, 2016 at 8:10am
[5 replies] Last: The same way as you pass any other class by reference. As Abstraction... (by MrHutch)
|
by nelborr
Sorted Linked List
|
Hi I'm trying to code a program to insert 12 integers in a linked list, sort them and then output the average and sorted list. I think i have the code mostly ri... |
Apr 13, 2016 at 12:55am
[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 numbers, from largest to smallest. ive try so many ways to f... |
Apr 12, 2016 at 8:09pm
[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 while and if statement's no array's... :( so the code look... |
Apr 12, 2016 at 8:02pm
[1 reply] : A more complex condition: If the new value is smaller than the smalles... (by keskiverto)
|
by ashley21466
help please!!
|
what is wrong with this statement int loopy = 1; do cout << "Body of Loop."; loopy++; while (loopy ... |
Apr 12, 2016 at 5:49pm
[2 replies] Last: You forgot the curly braces. Also in the while condition I gues you wa... (by Thomas1965)
|
by ashley21466
i cant see my results
|
int result, a=0, b=1, c=5; result = a > 5 || b < 5; What value is stored in result? |
Apr 12, 2016 at 4:56pm
[2 replies] Last: If the source type is bool, the value false is converted to zero and ... (by S G H)
|
by technologist
null ptr test
|
Code snippet showing null pointer check if (!array)return . How does the expression (!array) work to test for null ptr? void printArray(int *array, int... |
Apr 12, 2016 at 2:14pm
[17 replies] Last: > but it was the implicit conversion to bool that allowed the expressi... (by JLBorges)
|
by Edelweise
Read MySQL database table rows
|
Hello. So I have this C++ code: void mysql_do_ds_awards() { #ifdef USE_MYSQL char sql_cmd ; MYSQL_RES *res; MYSQL_ROW row; unsigned int num_fields... |
Apr 12, 2016 at 2:00pm
[2 replies] Last: Take a look at this: http://www.w3schools.com/sql/sql_create_table.as... (by coder777)
|
by grg1962
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 comments? void TestFuction(int testValue) { char *testPt... |
Apr 12, 2016 at 1:51pm
[4 replies] Last: > This particular compiler (tried with a few different versions of GCC... (by JLBorges)
|
by sunny0902
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 equation using for loop. y= 3x^3 - 7x- 11 (0 < x < 3) #inclu... |
Apr 12, 2016 at 1:34pm
[2 replies] Last: thank you so much :) (by sunny0902)
|