General C++ Programming - May 2013 (Page 37)

problems with Sorting strings/arrays in a user defined lexical order.
 
I have this problem, and i need some help and instructions. I previously tried to put strings in an array, but i couldn't modify the first index in the string t...
[1 reply] : Please use code tags next time. They look like <> to your right. Maybe... (by Bourgond Aries)
Parallellization using OMP.
 
Hello, I have a piece of code that I believe could benefit from parallellization. In short, it's a bunch of independent calculations (embarassingly parallel)...
[1 reply] : [quote=Gaminic]My first idea would be to have one dedicated thread for... (by Bourgond Aries)
by madhuj
Convertion Hex to Ascii
 
I want to convert Hex:390041 to ascii "90A", 39: 9 00: 0 -->Null 41: A i am getting only "9" in the bytearray,i know 0 is terminating the array , could...
[1 reply] : Perhaps this is what you're looking for. #include <iostream> #inclu... (by Bourgond Aries)
overloading operators Error
 
#include "money.h" using namespace std; #include <iostream> using namespace std; money::money(int d, int c) { dollars = d; cents = c; } ...
[5 replies] Last: i ment after i put in a dollar amount it doesnt output the second que... (by ezaz12121)
by BillH
SFML Window Title Bar font
 
Does anyone know if there is any way in sfml of changing the font style and/or size used in the window title for RenderWindow? As a secondary point - can th...
[1 reply] : Not sure how SFML handles this but usually the style of border and tit... (by Peter87)
Object Oriented Programming confused
 
HI guys i'm new to this concept Please guide me how to map a class diagram into c++ code for example below is a class diagr...
[2 replies] Last: well, you'll need to use the class keyword to define a class, and use ... (by hansaaa)
Multiple Files
 
Hello All, I am new to c++ programming i just want to know how to write the data into different files.Suppose my input files has 1-8 ids so each id data mus...
[1 reply] : // Open file 1 std::ofstream fout( "file1.txt" ); // write things t... (by Fransje)
Help with bubble sort and templates
 
Hello everyone. For my project I have to sort 5 numbers and 5 names using a template bubble sort. I have one header for the numbers, and one for the names. T...
[1 reply] : A Bubble Sort would be implemented as a function that operates on an a... (by kbw)
How to print this kind of result with arrow operator
 
pscobject->add_v3_signal($1, tmp); May I know how can i print the result perform by this code?After go thru this code i want to print what is the result wi...
[16 replies] Last: Ya I know.But mostly the basic one.Will put more effort to learn.Thx (by jaden5165)
std::ifstream::getline empty, in rather "big" project
 
Hi, I am doing some matrix operations, and, in the process of it, need to read in matrices, or, rather, matrix lines (vectors, if you so will), into c++. ...
[no replies]
Challenge you guys : Re-write the reverse function for reversing faster !!
 
#include <iostream> #include <cstring> using namespace std; int count = 0; int fill_ary(double * ary, int size); void show_ary(double * ary, int size); doub...
[2 replies] Last: Thanks for your help !! (by alantheweasel)
Turn based game, move to next monster if current monster is dead
 
Hey guys, I'm trying to make a game which is kinda similar to pokemon When my current monster is dead, the next monster will pop up I'm trying to find a way t...
[2 replies] Last: Sorry, I forgot to mention that I already have a monster array which i... (by Andranos)
implementing matrix class that provide basic matrix operations
 
please some one should help me, i have code for addition, subtraction, and multiplication, but i don't know how to code for transpose and inverse. #include <io...
[2 replies] Last: ok, hansaa thank you (by Amima 2)
returning char addresses
 
I came across this simple member function and Im confused this function returns and character address how can it return the character string Base? const ...
[5 replies] Last: yep, @ jidder (by hansaaa)
Question about char pointers and random binary files
 
Hey guys, so I'm new with working with random binary files, and I have a couple of questions of why certain things work...or at least look like they are working...
[5 replies] Last: do I get it right that it might have something to do with encrypting, ... (by hansaaa)
Memory allocated?
 
Hi, I have a pretty big std::vector<matrix>, where matrix is a custom class defined by me. I would like to know how much memory has been allocated to that vecto...
[2 replies] Last: That will give you memory usage of the process, and not the vector... (by hansaaa)
Expected Intializer before ... ?
 
I am working on my final project, and it seems to be almost complete. I am running it with the main.cpp and class files. Sadly, I keep getting this error to...
[2 replies] Last: I will look over my code and see if I missed any! Thank you very much! (by kimicatdemon)
Overloading #
 
It is possible to overload the sign # in some class?
[1 reply] : It is not. You cannot create new operators, only overload old ones. (by Cheraphy)
Counting Nodes of Binary Tree
 
Hello, I am trying to count every node of a binary tree internally (not passing in the root), all my attemps have ended in memory access violation or an inaccu...
[6 replies] Last: It would be more cleaner to rewrite the function the following way i... (by vlad from moscow)
Dislike using namespace std?
 
It seems as though more experienced programmers tend to write code with std::cout , std::string , etc., whereas less experienced programmers always write usi...
[5 replies] Last: Perfect example of why this is a thing: std::distance (by xismn)
May 2013 Pages: 1... 3536373839... 47
  Archived months: [apr2013] [jun2013]

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