General C++ Programming - October 2016 (Page 14)

by x2JJ1x
Can someone please explain what this is doing?
 
typedef void(__thiscall *setp)(int self, int location); setp SetParent = (setp)getaddy2(0x41C160); I have posted this same question on several different are...
[1 reply] : Don't do this. This is a hack, but won't always work. (by SakurasouBusters)
When exactly are static arrays needed?
 
I know the difference between static and dynamic arrays and I know advantages and disadvantages of using variables in stack vs. heap. However, I can't think of ...
[no replies]
by a015
Several questions from a beginner
 
I have several questions (I use dev c++) and I am completely new to c++ (1) what is the equivalent of the batch code findstr /i /p /s "string" "directory" in...
[1 reply] : http://www.cplusplus.com/reference/cstring/strstr/ https://www.exampl... (by SamuelAdams)
Getting a weird error, help?
 
I am getting a weird error when compiling so I'm pretty sure I did something majorly wrong but cannot figure out what. These are the errors that I'm receivin...
[1 reply] : Nevermind! Got it! Was doing: do while() instead of: do { stuff } wh... (by Ncookie)
My project closes - any idea?
 
Hello, I have a uni project to do. I've completed it but for some reason, when I run it in Visual Studio 2012, it closes at a certain point. I created it in Co...
[4 replies] Last: You could just write return 0; to exit the program. (by closed account LA48b7Xj)
Code will not print out information?
 
Hello everyone, I am trying to print out the names thatI listed below in my code... Not sure what I am doing wrong? Could anyone help me out? It should output ...
[2 replies] Last: I made a few corrections and changed the pass by reference to pass by ... (by closed account LA48b7Xj)
by swaabe
Write an algorithm that outputs the index of the first occurrence of the largest element in the sequence?
 
Write an algorithm that outputs the index of the first occurrence of the largest element in the sequence?
[1 reply] : Send me a private message. (by SakurasouBusters)
my next assindment is creating a game of Yahtzee, i'm not sure were to start.
 
Create Yahtzee in C++. Before you start writing any code, create a game loop diagram on paper, and work through the game loop to make sure it works. You will be...
[7 replies] Last: @SamuelAdams Johnny is just 16 years old and has not started the game ... (by SakurasouBusters)
Retrieve a pointer type, and use it to cast?
 
I have one parent class of BaseItem, and ~200 child classes from it. I have an array of BaseItem*, and right when the program starts, that array is filled with...
[3 replies] Last: Thanks, based on what was said, I redid the design. :) (by treefitty)
How to make my switch statement repeat?
 
// I just want my program to repeat the original question after a Switch statement has been performed. I tried using a for while loop but i couldnt get it to wo...
[4 replies] Last: I've edited your code... And it's working fine on Visual Studio compil... (by oowee8811)
by KVin
I have to convert dollar amounts entered by user and convert them to other currencies in C++
 
I have to prompt the user to enter amount in dollars, then Display a menu so that the user can select among three countries currency (Euro, Real and Pound)....
[6 replies] Last: This is my code for your program. #include <iostream> using namesp... (by oowee8811)
by Daical
Pocket Class
 
Hello I am seeking code for a pocket class to add pockets to a pool table game can anyone help. Cheers in advance
[2 replies] Last: That's an impossible request. You have not given any requirements. (by AbstractionAnon)
by Nico
UDP messages lost
 
Hello, I have made two programs, one to broadcast UDP messages containing a string of text and one to receive those messages and display the string. Current...
[3 replies] Last: I just found out how to do the broadcasting too. For future readers:... (by Nico)
Single Responsibility Rule
 
There's a guideline saying that one single function should have one single responsibility. But, oftentimes I come across with a problem: I should search through...
[1 reply] : It's simply not always possible to meet that criterion. For example, ... (by helios)
passing messages between objects ?
 
if you have a class named College which has a method "void getFees(double)", and another class named Student which have a method "double payFees()" and you wrot...
[1 reply] : The short answer is yes but it's a good idea to always try and write s... (by gunnerfunner)
use esc to call a function
 
Hi; I'm writing a program and required to give output when esc is pressed. How would I do this? Note: I'm still new to C++and right now I am studding OBJE...
[3 replies] Last: This is a simple program of adding two numbers. ESC is used to call th... (by oowee8811)
Image input, output and processing
 
I currently learning image processing in C++. I have experience with C++ but it's been a while and I'm not sure where to even start. For starters, I've mainl...
[2 replies] Last: i would recommend to use OpenGL for that https://www.opengl.org http:/... (by John87Connor)
Parsing XMl file through Command line application
 
Hi , I am creating a c++ command line application where I have to parse XML file and get required information and write them as a new file in a separate fold...
[3 replies] Last: Thank you so much for the ideas @integralfx and @Thomas1965.. :-) (by SubashJan)
arrays and pointers
 
Hello all, Please look at this code: double* fct(){ double arr = {3,6,9,12,15}; return arr; } //--------------------------------- int main() { double...
[5 replies] Last: Normally, when variables go out of scope, they are automatically destr... (by integralfx)
How does this class use constructor that references blink without an include statement
 
Please see class here: https://bitbucket.org/chromiumembedded/cef/src/95973a7c1db47df0fa07fd453d0e5250c0e0f66c/libcef/renderer/frame_impl.h?at=master&fileviewe...
[5 replies] Last: Where are namespaces defined in a program? Wherever the construct: ... (by cire)
October 2016 Pages: 1... 1213141516... 23
  Archived months: [sep2016] [nov2016]

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