General C++ Programming - January 2013 (Page 26)

by Smac89
Help with dynamic arrays
 
Just trying to fill a dynamically allocated array with values then I want to print out the values using pointer method: #include <iostream> using namespace st...
[2 replies] Last: Figured that was the problem, thanks anyway for the reply (by Smac89)
Mask the given string
 
Hi all, In my company we are not allowed to keep data in Dev environment in its original form. So we have developed a masking algorithm. The problem is I ...
[12 replies] Last: char* UNMASK_DATA( char* pStr ) { int i = 0; int count = 0; ... (by closed account D80DSL3A)
What is the best API?
 
What is the best API for game development in C++?
[1 reply] : Beginner or not? SFML is a good one for a beginner that contains wind... (by Stewbond)
passing types to functions
 
I've got a game engine with a line-trace collision method which returns the first object it hits. I'd like to be able to pass it a class-type so that it can ign...
[5 replies] Last: ...genius. thank you. (by caibbor)
Console applications keep crashing.
 
Hello, Any time I run my program after I make a selection from the menu the output is printed on the console screen then immediately a windows screen comes...
[4 replies] Last: @johnnydiamond08 Remember, an array, such as int rolodex ; , accepts... (by whitenite1)
by Elidor
Makefile problems
 
Ok, so this is the second clean installation of mingw I've done. Set the path right and now I tried doing makefiles again...still won't work. Now first the c...
[12 replies] Last: Sorry for bringing back a dead post but thank you Peter. It seems the ... (by Elidor)
find in string
 
I need to find position of certain character in string, so i made a function but it doesn't do what i thought it would. Consider this string: std::string l...
[6 replies] Last: Thank you everybody. (by morando)
Very simple web interface for C++ class
 
Hi! I am currently writing an AI engine in C++ (first step is to make it somehow like a chatting bot), when I first started this project I wanted to make it ...
[5 replies] Last: Check out the PHP function exec() : http://www.php.net/manual/en/func... (by aoeuaoeuaoeu)
Find all prime numbers from 1 to 1000. This is what I have done until now
 
#include<iostream> #include <cstdlib> using namespace std; int main() { int count=0; int number; cout<<"Enter an Integer:"; cin>>number; f...
[10 replies] Last: Here's what I came up with: #include <iostream> using namespace st... (by aoeuaoeuaoeu)
Unsigned Chars
 
What is the difference between a char and an unsigned char. I see unsigned chars a lot in os dev and windows dev can some one tell me the difference
[3 replies] Last: @Summerson Goncalves char allows positive and negative values... -127... (by vlad from moscow)
Memory allocation
 
Hello!!! why the result is different...how the memory allocation was made ? #include<iostream> using namespace std; struct teste{ int nu...
[2 replies] Last: but...the first result is zero "0". the second result are two addresse... (by Summerson Goncalves)
DLL problems
 
I not 100% sure if this is a beginner problem, but I know I'm close to fixing I just can't see it or don't know enough about C++ yet. I'm working on a project ...
[no replies]
nt returning expected
 
my main file has following code n=10; k=100; solution_archiv *sa = new solution_archiv ; int *initial_positions = new int(n); cout<<"--------top ten indexe...
[1 reply] : Repost with code tags. There under "format" when you're posting. You'l... (by ResidentBiscuit)
Split a namespace in multiple files
 
Hi. I want to create a namespace named MyNS. Can I define it in multiple files? I mean: file1.h namespace MyNS { const int File1 = 0; } file2....
[6 replies] Last: Thank you guys ;) (by majidkamali1370)
list size
 
why can not get sizeof of a list? Is it like Type *array; that you can not get the size of array and just return the size of pointer which point ro first el...
[8 replies] Last: There's nothing wrong looking at the C++ library headers (or even sour... (by Cubbi)
by arms4
clear screen for microsoft visual 2010?
 
I checked through the net and most of the solution like clrcr(); is not working for microsoft visual 2010. SO i was wondering for those who was using the same v...
[5 replies] Last: It's not the 1980s anymore. Too bad.. The eighties were awesome.... (by pogrady)
queues with counter
 
Can some one provide me an example code having a queue with a counter. The idea is If i add a element in the queue, the counter should increase and if i delete ...
[3 replies] Last: pls reply me that alone!! (by Rahul kumar S)
measuring the execution time of static and dynamic binding
 
consider the code bellow #include<iostream> #include<ctime> #include<boost/progress.hpp> using namespace std; class parent { public: virtual ...
[3 replies] Last: > i am actually trying to calculate the time to execute a statically b... (by JLBorges)
new line problem
 
I try to write a program which can (de-) cipher files. But I figured out that UNIX and Windows uses different methods to make new lines. UNIX: \n Windows: \...
[1 reply] : Open the file in binary mode. (by Peter87)
Help using gdb for tracing
 
I've currently started using linux, and am not able to trace the program as in TURBO C using F7 line by line. I tried google it out and found that can be done ...
[3 replies] Last: Thank you all. The problem's solved. I also found nice youtube video t... (by ankit2313)
January 2013 Pages: 1... 2425262728... 36
  Archived months: [dec2012] [feb2013]

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