General C++ Programming - February 2012 (Page 29)

largest possible memory by malloc?
 
The largest possible memory block malloc can allocate depends on the host system, particularly the size of physical memory and the operating system implementati...
[1 reply] : The maximum possible is the maximum value of a size_t for your syste... (by Duthomhas)
a question about "free"
 
int* i = malloc(4*sizeof(int)); free(i) problem: how free function know to free 4*sizeof(int) bytes?
[1 reply] : That depends on the implementation, but usually the memory management ... (by Athar)
Why Windows C++ muti-threading IOPS is much faster than IOMeter?
 
Greetings, Can anybody help me a little out of my difficulty? I have a SSD and I am trying to use it to simulate my program I/O performance, h...
[3 replies] Last: This has more to do with the file cache and read-ahead than journaling... (by Athar)
Trying to read file into array
 
I'm trying to read a unicode file and place it's rows into char arrays. Somewhere I kind of get astray in my attempts. I found some functions that seemed promis...
[4 replies] Last: Thanks for your concerned answer. :-) At this stage I just have to rel... (by liquidfuzz)
by dumkat
mysql++
 
I am inserting a unsigned char* array into table column that is BLOB and is binary. The data inserts fine. unsigned char* templByte; . . . string temp; st...
[2 replies] Last: It is a vector so it is fine. I did solve my problem. i used memcp... (by dumkat)
inserting the string pointer in the vector and displaying the value
 
Hi All , I have problem with the code as , i am trying to insert the string in the vector i am getting errors .. as i am getting the error in inserting th...
[7 replies] Last: Hi m thanks LB it worked .. (by bluecoder)
by rucafe
need help on reading in data
 
This seems like a pretty easy task to implement but I can't figure out the best way of doing it. I have some data that looks like the following: + alpha 3.6316...
[4 replies] Last: Oops of course. I'll give that a try.... (by rucafe)
help; segmentation fault, vectors, getline what do I do?
 
I have been up for 30 hours, help me solve this problem. The problem is in the readfile function. I don't think getline is actually pulling anything // As...
[2 replies] Last: while(true) //... Followed by what JLBorges said, this is what is c... (by clanmjc)
C++ printer handling
 
Hi all, I am stuck with a problem of printing output with printer. I can't even find answer by searching in Google. I am using Turbo C++ 3.0 compiler and i am...
[1 reply] : You mean a physical printer that puts ink on paper? You're going to ne... (by LB)
Help me understand the code please!
 
Problem Statement The greatest king of all times, Michael IV, is going to make big changes in his kingdom. The kingdom is composed of N cities (for simpli...
[4 replies] Last: I was thinking of an explanation... but thanks anyway... I guess I'll ... (by jumper007)
Byte * Byte = Short Int, How Byte*Byte*.... = Float ?
 
Just a question, if I intend people can only get level 255 on some game,if they make it at level 256.I would create dynamically a byte and multiply with the fir...
[9 replies] Last: Disch You are correct. Depending of what type of controller used 8, 16... (by Perman)
Lottery Ticket program - Need help!
 
Okay, so my assignment was to " create a program that will generate up to 5 quick pick Lotto Tickets. You must ask the user how many tickets they want and then ...
[7 replies] Last: Here is the quicksort. Place the numbers from lowest to highest in iRa... (by Perman)
Farenheight and Celsius (Negative Ints?)
 
I'm having trouble figuring out what's not right with my program. The code is: #include <iostream.h> int x=-80; int y=0; //cannot equal zero due to the for...
[5 replies] Last: Okay, I understand. Thank you! (by NerdTastic)
non-class type ‘ *(double*)
 
Hi guys, i have this code #include<cstdio> #include<cstdlib> #include<iostream> #include<string> #include<fstream> #include<iomanip> #include<cm...
[3 replies] Last: You declared that with the CMAT struct. Now it is just cmat* am . You... (by hamsterman)
by ToniAz
Not-so-nested If statements
 
Hello everyone! Is this possible in C++: if () { ... if () { ... } ... } Thanks!...
[3 replies] Last: One of the first things a compiler will do is get rid of any whitespac... (by MrHutch)
decrementing array
 
struct Process { int id; STATE myState; Process *next; }; i have the following function which should decrement all the current values of int by 1 for exam...
[5 replies] Last: thanks it worked, i just been moving stuff around a lot (by ruval002)
UNABLE TO DELETE BLANK SPACES FROM A FILE.
 
*********************************
[1 reply] : I would assume you open the input file and the output file at the same... (by Azagaros)
by kungen
Help random vector...
 
Hey! I need help .. Im stuck with my program im working with.. It's designed to create questions and cout questions in random order... I dont know how to use ra...
[3 replies] Last: I don't know what language it is but I am assuming CFragor is the Ques... (by Azagaros)
String vector sorting
 
I havent used sorting and alogorithms much and am Ok with vectors. Recently i faced an interesting question and want your suggestions with how to solve it. So, ...
[1 reply] : Have we tried the #including <algorithms> the c++ standard library. ... (by Azagaros)
February 2012 Pages: 1... 2728293031... 43
  Archived months: [jan2012] [mar2012]

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