General C++ Programming - July 2011 (Page 22)

by Troy
C++ - string to const char*
 
I'm writing a winsock send function that sends data that is passed with a string. I need to use the string because I'm converting it into binary (our server pr...
[3 replies] Last: Additional info : 0xCCCCCCCC is a special memory value for uninitializ... (by bartoli)
by chulio
generate specific percent of elements in a matrix
 
Hello World, i have the code below: #include <iostream> #include <math.h> using namespace std; int main(void){ int m ; int counter = 0; ...
[1 reply] : If you want each number have a probability P% to be -10, and (100-p)% ... (by hamsterman)
Storing objects into an array
 
Im trying to store objects of type MapEntry in to an array that is in another class but i'm not quite sure on how to approach it. Specifically because the array...
[3 replies] Last: You could add a public member function Add(const MapEntry& entry) to y... (by Galik)
Help needed forming a binary sequence
 
Hello, The overall concept on this piece of code is to transmit a message that comprises words (decimal numbers with a range -127 to 128). To do this, I need...
[2 replies] Last: Hello Luc Lieber, Thanks for this suggestion. I believe I can use t... (by anthony1947)
Write/read single bit in file.
 
Hello everybody, I'm a little problem, need to write / read a single bit in a file. My input bits are in an array of booleans. I've tried a lot of things on...
[9 replies] Last: For completion, I have found one way that the C++ standard insists on ... (by Moschops)
graphics in codebloc & vcc
 
graphics.h doesnt works in codeblocs or visul cpp...then how should i use to display graphics or convert programs with graphics.h header file in codeblocs?
[9 replies] Last: Graphics.h is a graphics library from borland. I ran a program which ... (by Cody39e)
Virtual Classes
 
I'm somewhat new to the concept. It's a feature of C++ I've been avoiding for a _long_ time for reasons less than good (other than the constant vtable overhead ...
[1 reply] : Hi, Your solution works at compiled time as well. If you want to use ... (by screw)
I need a Tutor...^^
 
Hello everyone I really need someone to help me with my skills on C++... I am currently a 2nd year student in college taking up the course Computer Engineering...
[7 replies] Last: Hello Peter, What are looking for C++ books, C++ Video or a mentor wh... (by minix)
formatting strings without sprintf
 
Hi is there any native class in C++ that provides same capability that sprintf for strings ? I mean, formatting directly to a string instead of : char t...
[2 replies] Last: Thanks! (by marty2756)
STL library problem
 
Hello all, I am having a hash_map with key: char *. I have defined it like this: struct eqstr { bool operator()(const char* s1, const char* s2) c...
[3 replies] Last: In Visual Studio 2008, hash_map stuff is in namespace stdext, not std.... (by m4ster r0shi)
by Troy
C++ - binary to string
 
Ok, I last posted about my string to binary conversion and got your help. But now I need help getting the binary back into ASCII characters. I got it to print i...
[1 reply] : Line 3 must be: stringstream ss; (by modoran)
virtual fuction
 
Hi there, I am declare a pure virtual function in a based class, this base class has two derived classes, but I realized I only want to implemented the pure vir...
[1 reply] : Sure. Just implement it in the one class only. Of course, the other de... (by anonymous23323124)
by Troy
C++ - Convert const char* to binary
 
Ok, I have created a function that is supposed to take a passed string and convert it into binary.. Since this only converts each character once, I had to creat...
[4 replies] Last: Thank all of you so much! It works! (by Troy)
by NickT
Processing blocks of bytes.
 
This is my first post so before I move on to the relevant matter, I'd like to say "Hello World" to everyone! Now, on to business. As the title says I am atte...
[3 replies] Last: Thanks guys! I've actually realized a mistake while trying to accompl... (by NickT)
please help with a do while loop question
 
I created this program to all the specs that our teacher required except for having it loop to allow the user to enter salaries until the sentinel value is ente...
[7 replies] Last: Thank you guys so much, I took a lot of your advice and now the progra... (by jgirl2412)
Problem with typedef struct.
 
Hello, I'm trying to work with equalization with the bass libary. But I don't know how to create the structure needed. The structure used is: typedef struc...
[6 replies] Last: Okay: Another problem has arrived. I use the struct to set the equali... (by Shatronics)
by HenriK
How should I initialize - problem with static member variables
 
Hello once again. I was learning more about this static -keyword. Interesting and useful keyword I have to admit and I learnt you can use it create class statu...
[3 replies] Last: Never mind, it works. I had used these variables outside the class sta... (by HenriK)
how to get numerical solution for an equation
 
Hi everybody i want a numerical solution for "p" in this equation and i don't know how to implement that! the variables W, n, m are known and have initializ...
[6 replies] Last: Assuming the function isn't badly behaved, instead of calculating the ... (by kev82)
Direct assignment with operator=
 
Hello guys :) I created a class, and defined operator= as follows: template <typename T> MyClass& operator=(const vector<T> src); but the proble...
[2 replies] Last: Ah! thank you so much, pal! by defining the constructor it worked ^^ (by TheDestroyer)
Entity Management with Components
 
Hello, my current task for my game engine is to write a system for managing the games entities. I've read up about the component design pattern and it seems lik...
[1 reply] : In order to store these things polymorphically, they will all need to ... (by jsmith)
July 2011 Pages: 1... 2021222324... 30
  Archived months: [jun2011] [aug2011]

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