General C++ Programming - April 2019 (Page 7)

why in this possible??
 
#include <stdio.h> int main() { int num1,a=1,b; printf("%d %d %d ",a++,a++,a++);printf("%d %d ",a++,a++); } i think the out put s...
[3 replies] Last: [quote=tlgh1113]i think the out put should be 1 2 3 4 5. Why? What ma... (by Cubbi)
Debugger's not working
 
I have a code that I want to debug but all debug features are grey for me. Setting breakpoints won't change anything. I'm using the newest codeblock 17.12. ED...
[1 reply] : I don't know codeblocks but this sort of thing can be caused by not co... (by jonnin)
by adam77
Cross-platform CMAKE project for old VESA/SVGA DOS Graphics
 
Hello everyone, I've a lot of old code that I used to do in my school days. Those code maily used TurboC and DJGPP. For Graphics I mainly rely on Interrrupt 10...
[2 replies] Last: And for display I just need a bitblt support. I would suggest that yo... (by coder777)
Need to build cross platform app(need help of all PC and mobile dev’s)
 
Hello guys I’ve been reading a lot of articles and questions in this website since I started programming. Now me and my friends had an idea for a business. My...
[2 replies] Last: Felgo is also a good place to start. What you want to do is more than... (by Duthomhas)
float numbered list? C++
 
I am trying to make a sales calcualtor but the part i am stuck on at the moment is that I am trying to use float (state_list), for that when the user enters in ...
[1 reply] : Yes, you will have to declare what all the states are. The program wil... (by fiji885)
by vibhu
virtual class inheritance
 
hi Can anybody please explain how the answer is 223 of the below problem #include <iostream> using namespace std; class B { public: int n; }...
[4 replies] Last: @Repeater thanks for the reply.. (by vibhu)
by asy04
Convert to user input
 
return 0; }
[4 replies] Last: OP's original post. How can I convert this to user input? #include... (by salem c)
by asy04
Convert into a loop
 
cout << ave1 << endl; cout << ave2 << endl; return 0; }
[2 replies] Last: OP's original post for reference. #include<iostream> using namespa... (by salem c)
If, Else infinite loop help, C++
 
I am trying to make a C++ sales calculator and for my if, else statement I have my "Purchase" as == to false at moment, i am a bit confused on how to get it so ...
[1 reply] : Check out the answer in this thread - https://stackoverflow.com/questi... (by TarikNeaj)
Getting "instantiated from here" error while working with templates and classes
 
I'm in a class learning C++ and our latest project includes using templates in conjunction with classes, arrays, operator overloads and some other junk. I have ...
[2 replies] Last: «instantiated from here» is not an error message your errors are: - ... (by ne555)
How to check which argument was picked from a given prompt ?
 
template <class choice> choice GetChoice(string leftStr, string rightStr, choice a , choice b) { cout << "Please pick " << leftStr <<" or " << rightStr; ...
[2 replies] Last: #include <iostream> #include <limits> template <class choice> choic... (by closed account z05DSL3A)
Strings Program with full names
 
I am having trouble getting the last two statements to execute that should print the full name in the middle of the screen. any help is greatly appreciated. Tha...
[5 replies] Last: Thank you so much!! I had completely forgotten about substr. It works ... (by kmheflin712)
by frek
AI in practice, when coding
 
Hi, For a long time, even after being familiar with AI theoretically at university, AI was slightly terrifying for me, especially when I'd listen to media how ...
[5 replies] Last: I am not sure what question you want answered. Yes, AI can be done in... (by jonnin)
by slimmy
Help with Vectors and Classes
 
I am terrible with classes long story short. I need to use a vector to hold instances of classes. I have 3 classes used in this, Light, Material, and Sphere. My...
[1 reply] : Can you replicate the problem with the bare minimal requirements to re... (by poteto)
Tortoise and Hare race code
 
Hi, everyone, I am trying to recreate the classic race between Tortoise and Hare and I made my code. I am not sure what is wrong in order to get whole race, pri...
[3 replies] Last: Upload your latest code (below this post, please). It's impossible to ... (by lastchance)
setting the next result to 0
 
hello everyone i have been doing a problem on quadratic assignment problem i got a problem on the answer of the coding.. i have a set of answer, the first answ...
[1 reply] : this is the data dist12rou.txt 0 36 54 26 59 72 ... (by shuthairah)
How exactly does atan2 work?
 
I'm trying to code a steering behavior thingy with SFML using little sprites of fish lol. The trouble is the fish follow very strange directions and if they are...
[11 replies] Last: Yeah! Glad you figured it out! (by Duthomhas)
Not really understanding classes and inheritance.
 
I have a gizmo class with 2 virtual methods. I can put gizmos in my program, the compiler is happy with them and their methods run happily when I call the base ...
[4 replies] Last: After your code editing, your first post is no more connected with you... (by Enoizat)
STRUCTS
 
Can someone explain what is the purpose of the & in the print function and how it works. I tried running this with and without the & and got the same thing ...
[1 reply] : That is a reference, and instead of making a copy of your today object... (by deleted account xyzzy)
by frek
Some clarifications
 
Hi all, Let's explain the code below: struct X { static void f(); // declaration static int n; // declaration }; X g() { return X(); } // some f...
[6 replies] Last: Thank so much to both of you. I appreciate your help. (by frek)
April 2019 Pages: 1... 56789
  Archived months: [mar2019] [may2019]

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