Thanks it got resolved. Thanks for the wonderful 'emplace_back' idea
Type: Posts; User: progmateur
Thanks it got resolved. Thanks for the wonderful 'emplace_back' idea
I have two class Particle and Spring.
Spring:
classSpring{
private:
double ks;
double kd;
Thank you for your time and replying.
int main() {
vector< Base*> scene_;
get_input(scene_);
for(size_t i =0; i < scene_.size(); i++)
{
std::cout << scene_[i]->getSomething();
Still not working... :'(
You are right about the variable name..
A piece of code would be very helpful
#include <iostream>
#include <conio.h>
well ,i get what you said and did this accordingly...but without results :(
please enlighten @tabstop
#include <iostream>#include <conio.h>
using namespace std;
class Node//BST node
{
Well,but when I was checking whether the tree is properly inserted or not..I see that the insert() is malfuctioning..please help
I was incorporating functions like...
void Display()
...
I am creating a BST class that has insertion and traversal function (USING RECURSION)..please tell me why this program is termination abnormally..
#include <iostream>#include <conio.h>
...
I am designing a class FLOAT with overloaded operations
#include <iostream>#include <conio.h>
#include <math.h>
using namespace std;
class FLOAT
{
I was trying to implement my own "String" class.
I have written the class and the following error occurs.
1.When I create 2 String objects in main function only one string is getting inputted and...
making the fields in the Node class public solves the problem..but the implementation I believe becomes very much faulty and disrupts OOP concept
not inheriting properly
please tell me the reaseons
and provide the corrected code if possible
#include <iostream>
using namespace std;
very smart...but this is not a home work problem
The triangle pattern that I wanted tp print had '*'s in ascending form like 1,2,3,4,5,6...
But my code printing it in form of 1,3 ,5,7,....
...
This isnt a home work problem
The triangle pattern that I wanted tp print had '*'s in ascending form like 1,2,3,4,5,6...
But my code printing it in form of 1,3 ,5,7,....
Q.print triangle pattern using one loop and recursion
eg: 5
13268
#include <stdio.h>#include <conio.h>
void pattern(int n,int N)
{
Q1.
#include <stdio.h>#include <conio.h>
int main()
{
char c=125;
c=c+10;
printf("%d",c);
very kind of you...now I understand the meaning of forward declaration! :)
I would be greatful to you if you ellaborate...I am new to c++.. a block of code as an example will help
It didnt work.........
errors:
In instantiation of `NODE<int>':
34 instantiated from `STACK<T>& STACK<T>::PUSH(T) [with T = int]'
66 instantiated from here
8 template argument...
just trying a straightforward implementation...later Ill modify my code as per my requirement thank you
yes I did heres the code
#include <iostream>#include <conio.h>
using namespace std;
class NODE
I am getting errors...please rectify my code or atleast point out where I am wrong
#include <iostream>#include <conio.h>
using namespace std;
template <class T>
I am getting errors...please rectify my code or atleast point out where I am wrong
#include <iostream>#include <conio.h>
using namespace std;
template <class T>
thank you very much I have already got that ...thanks for responding :D
Was trying to implement a simple linked list program using c++ with only insert and display operations.There was no problem during compile time...the result was absent
Compiler Used:
DEV...