General C++ Programming - September 2016 (Page 9)

I need explanation about data dictionary
 
I have some problems regarding understanding data dictionary offline/online, I mean a bilingual dictionary English/another language, a searchable dictionary con...
[7 replies] Last: well-done kemort. Appreciate yr answer. (by omer123)
for loop
 
for(char& c: input) How does this work?
[4 replies] Last: So it would be equal to for(int i = 0; i <= input.length; i++) Yo... (by keskiverto)
String and char related question
 
Let's say I have a one big string which is coded with symbols like Morse Code. And i have declared every single letter as a morse code. But I need to make every...
[16 replies] Last: I've heard about Linux but I am deep into the shit with programming I ... (by Tomheza)
by Dkob1
empty function, is this correct?
 
How can the empty() function determine whether the doubly linked list is empty? The empty() function checks if the header sentinel's next pointer points to t...
[1 reply] : What is "header sentinel"? What is "next of sentinel"? What is "traile... (by keskiverto)
Return variable help
 
need to somehow get the center point of an object using this code, double Center_x, Center_y; return Center_x = (p1x+p2x+p3x)/3; return Cent...
[5 replies] Last: Do you have a type for a point? For example: struct Point { double ... (by keskiverto)
Some misunderstandings
 
Hi guys, Please have a look at the codes below. The first one is a template class named list with another class inside itself ( iterator ). And the second,...
[1 reply] : Guys, my questions are these: Is it possible to declare a class into a... (by closed account G1vDizwU)
Help
 
// Starting with x=-3, going up by 0.5 each time untill it reaches 3.0 #include <iostream> using namespace std; int main() { double x; int y=x...
[8 replies] Last: The potential for errors arising from the choice of data type and any ... (by closed account 48T7M4Gy)
Trouble Compiling GLEW
 
I've downloaded the source files for GLEW and have read/watched a few tutorials for compiling them. One method I saw involved creating a batch file to do the wo...
[no replies]
Pointer from pointer address (expression must be an lvalue or a function designator)
 
When i try to convert pointer to pointer i get error: expression must be an lvalue or a function designator Here is my code: sf::RenderWindow** window =...
[1 reply] : You can't get the address of a temporary. int get_int(){ return ... (by helios)
by cmisip
bit shifting unsigned vs signed
 
I am using the Irobot create's OI to send and receive serial bytes for sensor information. From the create oi manual: The distance that Create has traveled in...
[2 replies] Last: @Duoas Thanks for your response. It led me down the right path. Th... (by cmisip)
Return function problem
 
I need to somehow get the center point of an object using this code, double Center_x, Center_y; return Center_x = (p1x+p2x+p3x)/3; return Cent...
[3 replies] Last: Declaring variables should be one of the first things you learn. Simp... (by SamuelAdams)
Iterator help
 
I cant seem to get this piece of code to work properly i am not sure how the iterators work i am looking for the smallest number but i can't seem to get it ...
[2 replies] Last: Why not just use std::sort provided by STL? (by Arslan7041)
Quick questions about unions in bit fields
 
I would like to create a bit field struct composed of enums. However, I need to include a union of enums for one of the bit fields because how its contents is ...
[1 reply] : Nope.... guess not. (by primem0ver)
C++ console application raw input mode windows
 
The c++ console application that I am building asks the user to enter a predefined time for input.The predefined times are **09:00AM OR 12:00PM OR 04:00PM** I a...
[2 replies] Last: Oh I dint think about that .Thanks ! (by Alphagamer7)
Overloading inherited function
 
I trying to building a game engine using c++ and SFML library. I am working on collision detection. I created a base class Collider that has a pure virtual func...
[no replies]
Obfuscating strings in code
 
Good afternoon, I want to obfuscate some important strings in my DLL. A simple conversion to hex code or such is too simple... And some strings are in the sp...
[no replies]
Some qustions on managing a large number of objects with a hash table
 
I am building an object manager that manages several type of objects that serve different purposes. All of these must be searchable by a string that represents...
[7 replies] Last: [quote=TheIdeasMan]That's it, there is no conversion or casting done b... (by primem0ver)
by Raahul
Could someone please explain how this code works?
 
Here's the code : void main() { int i,n; char *x="Alice"; n=strlen(x); *x=x ; for(i=0;i<=n;i++) { cout<<x<<" "; } cout<<endl<<x; getch(); } ...
[5 replies] Last: The output is : lice ice ce e I got this using turboc++ (by Raahul)
by xismn
C++ "standard messages"
 
Hello, I'm looking to satisfy a curiosity of mine. As a preface, Consider the following code: #include <iostream> #include <stdexcept> #include <vector> int...
[1 reply] : You are asking two questions, really: 1. Is it okay to use exceptions... (by Duthomhas)
Need Help! Formatting issue!
 
This is my code, I have a formatting issue with day one being moved over, can anyone help me out? thank you! #include <iomanip> #include <cstdlib> #include <c...
[2 replies] Last: Here (line 29 or so), << setw(30) << endl; the setw serves no purpo... (by Chervil)
September 2016 Pages: 1... 7891011... 19
  Archived months: [aug2016] [oct2016]

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