General C++ Programming - December 2012 (Page 7)

Memory managment
 
Hey there! Im curious a bit about placement some struct in memory. The question is next: Does it safe ? struct A { int a, b; }; struct B { ...
[3 replies] Last: Assuming you fix all compile errors and plug all memory leaks, this is... (by Cubbi)
Endian Issue, I Think
 
// a 64-bit number, zeroed out for now typedef unsigned long long UINT64; UINT64 x = 0x0000000000000000; // set the byte at the highest address to 0x80 /...
[7 replies] Last: Thanks for the help, everyone. Things have finally clicked in my brain... (by JamesMSlaughter)
File Streams Question
 
I have been looking for this specific method of reading from files, but I could not seem to find anything useful. What I'm actually trying to do is reading the ...
[3 replies] Last: Thank you guys. Now I can start working on my code. Topic closed. :) (by jumper007)
by xzbit
AES
 
int main() { aes_context ctx; CHAR *input = "Sample text abc"; CHAR *out; CHAR *secret_key = "secret key"; BYTE* buf = (BYTE*...
[3 replies] Last: AES takes 16 bytes to another 16 bytes. To use it on more data, see ht... (by hamsterman)
operator[]: distinguish read and write
 
Hi, I wonder if it is possible to write, for some class, an operator which distinguishes between read and write access, to keep track of properties of the d...
[3 replies] Last: Thanks! This might help me. (by ThomasX)
Object pointer problem
 
I have a pointer to structyre Igrac and I have created a list with malloc (although I think I'm going to make it a vector after writeing this post) and when I t...
[15 replies] Last: Ok, so I was reading about forward lists (because they are read only i... (by zoran404)
by S G H
Templated Functions
 
Yeah, I'm still working with Templates and Classes. I've got a class that holds multiple elements and want to sort it in various different ways with the sam...
[4 replies] Last: Besides the resolved question, it was supposed to sort an array of dat... (by S G H)
by Phiru
vector push_back? append?
 
I want to know the differences between push_back and append func. I usually use push_back function to add some elements to vector. and while I am googling...
[3 replies] Last: There is no such thing as std::vector::append in the standard C++ li... (by jumper007)
C++ help me please
 
You are asked to write a function (prototype and explanations of which will be given below) and a main function to test the function you wrote and demonstrate t...
[no replies]
evaluation algorithm
 
Please help me evaluation this algorithm.Thanks very much @@ the greatest common divisor int UCLN(int n,int m) { if(n%m==0) return m; else { int...
[7 replies] Last: #include <cstdlib> #include <iostream> using namespace std; int UCLN(... (by FredFlintstone)
Text-Based RPG Game problem
 
I am working on a text-based RPG game and every time I run the code, it just repeats the first cout's over and over again. The one thing that it does that I w...
[3 replies] Last: The problem is you are using continue statements incorrectly. When you... (by Hippogriff)
java.rmi.dgc.Lease class in c++?
 
Hello everyone, I am looking for a way to request and grant leases to remote object references. I know in java we have java.rmi.dgc.Lease. Is there any corre...
[no replies]
Dynamic arrays initialization
 
Pick and discuss which is the sanest method. int *i1 = new int ; int *i2(new int ); int *i3{new int }; int *i4 = new int (); int *i5(new int ()); int...
[3 replies] Last: Yes, that's about right (by Cubbi)
by Mouna
undefined reference to function
 
Help pleaseeeeeeeeeeeeee !! I have a problem , I can't figure out what's the error !!! here my code #define HDR_ANT_PKT(p) ((struct hdr_ant_pkt*)hdr_ant_...
[2 replies] Last: Yes , I already did that , int hdr_ant_pkt::offset_; static class An... (by Mouna)
by caplin
how to read file into array
 
the data is
[1 reply] : The primary problem is that not everything is comma separated in the f... (by cire)
Binary Search Tree
 
Hi everybody. I make logical mistake but I don't find mistake. my algorithm; #include<iostream> using namespace std; struct node{ struct node *lef...
[1 reply] : If you find that you need to change a parameter which is a pointer in ... (by cire)
by huike
SDL window crashing when using console
 
I'm new to SDL and C++ in general really, but I've been using the console to control a text based game and an SDL window to display images in a program I'm writ...
[1 reply] : On windows, SDL will send all output to file so you will not be able t... (by Peter87)
send sms by GPS modem
 
I am student, I need to program small console application for college: working with files and structures and I know how to do it. But I need simple code for sen...
[no replies]
Visual c++ and Excel
 
hi guys i need a help. i have an aircraft battery which contains 20 cells which has different voltage values (nominal of 1.2V). i have to display it in a excel ...
[2 replies] Last: I want it to run forever. How do I put a delay in c++? (by ADAMLIES)
Double Linked Lists
 
So Im trying to make a double linked list that I can search for the name and also search for people only below a certain age, but I dont know how to do that. So...
[no replies]
December 2012 Pages: 1... 56789... 43
  Archived months: [nov2012] [jan2013]

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