General C++ Programming - December 2015 (Page 8)

Strings
 
Hi I have an array that is the alphabet (in alphabetical order) and i wanted to know how move a string (that is inputed) one to the right in my array then outpu...
[8 replies] Last: #include <iostream> #include <string> #include <iomanip> int main() ... (by JLBorges)
by AcarX
Some questions about namespaces
 
My first question is, can you declare new namespace members from different headers? For example: // MyClassA.h namespace MyNamespace{ class MyClassA; ...
[7 replies] Last: I guess my understanding of namespaces is wrong. What I need was to ha... (by AcarX)
ofstream txt file creation..
 
Hey all, With ofstream, i'm trying to create and write to a txt file but it doesn't appear to be working. No errors, just cannot find the file its created.. H...
[10 replies] Last: That sorted it Chevril :) thank you. I knew it would be something obvi... (by hardwired)
Set Alarm with bit stops switching
 
I am trying to set up an alarm on a Red Lion touchscreen that is connected to an Allen Bradley PLC through a wireless link from dredge to dredge about a mile aw...
[1 reply] : If you have access to the code, you'll need to determine which value i... (by SamuelAdams)
Retain image when zooming in
 
I have a small generator, that generates terrain using perlin noise. Now id like to zoom in to a area to see it closer, so i need to calculate it with even more...
[no replies]
fastest program to enumrate all combinations
 
If i have numbers from 1 to 78 and want to find all possible 13 numbers at a time fastest way into file write Kind help with a fastest algorithm so that...
[1 reply] : You want to generate all possible combinations obtained by choosing 13... (by Chervil)
Variable Value not recognized outside of Class
 
Im currently working on creating a game engine and I'm having a bit of trouble with one thing, would love some fresh eyes on this problem, I'll give an example....
[2 replies] Last: That makes sense, I tried something and what you said was the problem,... (by TarikNeaj)
Compare strings and find index of string array?
 
Hey all, With my program, the user enters a musical note value and octave in one string, like A#4 or C8 etc What i want to do is compare the first 1 or 2 lett...
[8 replies] Last: Hey tipaye, thanks for that breakdown of it all. Learnt a lot and got ... (by hardwired)
by V07
Searching for a file in the computer
 
[closed my old post since it it has insufficient explanation] Hi everyone, I have a program which generates a string for the file entered. (The length of t...
[4 replies] Last: Hi, quote : "am I missing something" ... (by V07)
Stacks and Queues Project - Where to go from here?
 
It's split up into 3 parts and I'm really confused on how to finish it from here. PART 1 #include<iostream> #include "MyStack.h" using namespace std...
[2 replies] Last: Please edit your first post and put the code inside code tags. To do t... (by dhayden)
String array question
 
Why is this a problem? std::string sBannerLine1 sBannerLine1 = { "_", "_", "_", "_", "_", "_", "_", "_", "_", "_", "_" };
[2 replies] Last: Given that you left out the semi-colon in line 1, I think you were try... (by tipaye)
polymorphism (1,2)
 
...
[20 replies] Last: thanks for the explaination,i will read it (by mike9407)
printing a function more than once
 
#include <cstdlib> #include <iostream> #include <string> #include <fstream> using namespace std; string name(string fname, ifstream& in) { while (!...
[2 replies] Last: @Peter87 ughh thank you so much haha. So simple but I couldn't figure ... (by psyraz562)
by kalki
How to find position of bit set in a binary number??
 
#include <iostream> #include <limits> void doBinaryJunk(unsigned n) { unsigned mask = 1 << (std::numeric_limits<unsigned>::digits-1) ; unsigned ...
[1 reply] : #include <iostream> #include <bitset> #include <limits> #include <vec... (by JLBorges)
Game programming
 
I was wondering what your input would be on using cocos2d-x for making a game? I feel that I'm ready although I'm probably going to be in for world of headaches...
[16 replies] Last: You downloaded the right version of SFML for your version of Visual St... (by JayhawkZombie)
by mizan
rean value generation of random number
 
I am facing problem to generate random number in real value. Let us consider l=0.045, so i need the random value between 0.0025 to 0.040. Can anybody help me h...
[2 replies] Last: #include <iostream> #include <random> #include <ctime> int main() { ... (by JLBorges)
Advice on me Code
 
Please critique and give advice, I trying to get better at programming. Thank you. This code is about dogs in pound awaiting to be rescued or deathrowed. #in...
[no replies]
what is mean by x(x)
 
Point(int x = 0,int y =0):x(x),y(y){};
[10 replies] Last: yes you can but it's not recommended for several reasons. for someone... (by kkhalaf)
by Andym
APP Delelopment
 
Well, I finished my latest class. Thanks to all for helping me. Now on to bigger and better things. I am planning to write an app for my Fantasy Football leag...
[no replies]
Structures and Member Functions
 
Hey guys so I'm creating a program that lets the user enter info for an array of Cars, but for some reason when I call the member function "assignValues" from t...
[2 replies] Last: Thank you for your help I got my program to work, moving the structs f... (by ziggypiggy)
December 2015 Pages: 1... 678910... 22
  Archived months: [nov2015] [jan2016]

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