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

Creating a variable inside a function arguments (1,2)
 
In the following code: #include <iostream> // For stream I/O using namespace std; int function(int a) { return a; } ...
[35 replies] Last: Alright, just to prevent obfuscated code I guess. And it doesnt let yo... (by Anmol444)
How do I create a "bin" using C++?
 
The title of the tgread says it. I need to know how to do this.
[8 replies] Last: Um, goto program folder, right click, goto New >, click on new folder,... (by greenleaf800073)
Converting Quick sort to template
 
My whole code is included below, although what is really important to me is only the first two functions, the quicksort and the partition... Whenever I build t...
[6 replies] Last: I'll need to look into that. But right now, I'd like to stick to my pr... (by infernoking)
by Aceix
Can a class constructor becalled like a method?
 
Hi, when the below is done, does it call the constroctor only, and if yes, constructors do not have return types so how does it work? is there anything behind ...
[6 replies] Last: Fun fact: c-style casts and functional casts are both constructor call... (by LB)
Problem with templates
 
Hi, after a lot of years of C-Sharp development I moved back to the good old c++ now. One new feature that is new to me is templates and I run into some troub...
[7 replies] Last: For use of extern you should know in advance template parameters which... (by MiiNiPaa)
Namespaces'n Libraries
 
Hello, I was wondering about something again, as I often do. I find that a lot of libraries that C++ can import (Xorg, DirectX, WinApi, etc) do not contain t...
[2 replies] Last: IMO, that's pure short-sightedness or laziness on the part of the deve... (by AbstractionAnon)
Help in making a countdown timer
 
Hey frns I'm creating a game in which i.need player to.answer.my question within 10 seconds... So i.need a code for this timer... I dont want code to be p...
[2 replies] Last: If you don't want the timer to block the user input, you're going to h... (by andywestken)
by labeeb
Connecting an event with a key on keyboard
 
I am gonna make a simple game in c++. I need a way how to use a particular key on the keyboard ,when I hit the key certain function should be called. For movem...
[4 replies] Last: sets key to an empty character. char() just constructs an empty char. (by giblit)
by matt11
Need Help LOST...
 
Hello everyone im currently using Xcode to do my c++ class online, i have a question here that im suppose to answer. Question is : Write a program that open...
[5 replies] Last: Ok i gotcha makes sense so what exactly would i have to do in order to... (by matt11)
by shsaad
Want to manipulate .xls in c++ then again in .xls format.
 
HI, I m new here...and need some help... i am just a beginner u can say...i dun knw abt OOP even... but i need help in this project... i dun knw from wher...
[3 replies] Last: There are also this earlier cplusplus.com post re. Excel Excel automa... (by andywestken)
Where does the sound produced by bell operator or \a come from?
 
Where does the sound produced by bell operator or \a come from? And what kind of sound is it? I tried with my speakers but heard nothing...
[1 reply] : It comes from your system's internal speaker. Most systems no longer h... (by LB)
by ane
how to declare number of vectors dynamically
 
I need to declare the number of vectors according to an input parameter call NUM HOST. for example, if NUMHOST=4, I need to declare 4 vectors and the name of t...
[13 replies] Last: thanks, works!! (by ane)
by Numeri
Procedurally Generated Content
 
Hi! I've been learning about Procedurally Generated Content lately (in particular, Perlin noise). Perlin noise works great for making things like landscapes, he...
[2 replies] Last: I'm not sure if this is a good place to ask Numeri. I've done game-dev... (by Code Assassin)
strncpy(,,) , char* pointer ,char array;
 
Hello i have a function where i pass a char* buffer, int bufferSize, int blockSize. They are both allocated new char ; My qustion is this. Is this a vali...
[4 replies] Last: Thank you for your replys i solved my problem now. I did as you sad an... (by WetCode)
Problem in Algorithm Recursive?
 
Hello friends, I have a problem to implement a recursive version of an algorithm that I made, I get different values, I hope you can help me, here are the code ...
[no replies]
by seehat
Strcmp help !
 
#include"stdafx.h" #include<string.h> #include<math.h> #include<stdio.h> #include<ctype.h> #include<stdlib.h> void convert(char *a); void lower(char *...
[12 replies] Last: You're reading into a double variable with a "%d" format. %d stand... (by KRAkatau)
by Cagdas
Purpose of allocator
 
hi all, i try to make a vector-like array container, just for experiment :), i am not a experienced one indeed. When i search about a little bit, i found my...
[2 replies] Last: ty for the response and the links i'll begin to study them... (by Cagdas)
c++ g++.exe help
 
Hey, I was trying to program a bit with c++ but I found out that I can't compile and run the files for a simple cout << "Hello World"; When I try to compile and...
[no replies]
simple file i/o
 
Saw a thread about a program to add an extra 'b' before 'B' in a file containing 'ABC'. I tried it. Here's my code: ("file1.txt" contains "ABC") #include<...
[4 replies] Last: It is OS specific, so you should look into your OS headers. Or you can... (by MiiNiPaa)
Problem when using struct pointer as class constructor parameters
 
Hi, I got a Segmentation Fault(core dump) error when running the following code. Seems like the struct pointer does not work when used as the constructor parame...
[9 replies] Last: There is a typo in the codes. I forgot to put ; after class definitio... (by cire)
May 2013 Pages: 1... 1819202122... 47
  Archived months: [apr2013] [jun2013]

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