49,761 Topics

Member Avatar for
Member Avatar for eman 22

I have a problem when I declare template class inside another a template class. [CODE]#pragma once template<typename T> class D<T>;//error 1,2 template<typename T> class B { D* d; public: B(void){ } ~B(void){ } }; [/CODE] [CODE]#pragma once #include<iostream> using namespace std; template<typename T> class B<T>;// error 3 template<typename T> class …

Member Avatar for mike_2000_17
0
336
Member Avatar for Ajay2100

hi i am facing same error, but when i go to defination and update code same as you suggest but it wont work, Error : Error 1 error C1189: #error : This file requires _WIN32_WINNT to be #defined at least to 0x0403. Value 0x0501 or higher is recommended. c:\Program Files\Microsoft …

Member Avatar for raptr_dflo
0
271
Member Avatar for henrimontreal

Hey guys! I am new at Class and object things. Before introducing the object oriented issues my life was easier! I wrote these codes here: /*--------------------------------------------------------------------------------------- Source File: OOP4.Henri.cpp Program name: Object Oriented program, Assignment 4 Author: Hassan Aghaei Baradaran (Henri) Compiler: Bloodshd Dev-C++ 4.9.9.2 Purpose: To define and demonstrate …

Member Avatar for raptr_dflo
0
253
Member Avatar for GamerXxX

In my code i have got when player touches point,it registers collision and prints out score in the console, the problem is that for some reason instead of just printing one score-point per point (There is 10 points in the array) it continues to add score for as long as …

Member Avatar for GamerXxX
0
135
Member Avatar for Tellalca

Hey; I'm trying to change the mode of a file in Linux system. I know I must use chmod(const char* path, mode_t mode) but I don't really know how to handle the mode. How can I manipulate mode_t variable to apply my own mode?

Member Avatar for thierrypin
0
116
Member Avatar for johnray31

Hi , I need to parse a file that contain linux interface information. My file text is like below [QUOTE] Interface ge1 Hardware is Ethernet Current HW addr: 00a1.2599.0003 Physical:00a1.2599.0003 Description: BC3 - Slot 3 (Phys Slot 7) index 5001 metric 1 mtu 1500 duplex-full arp ageing timeout 0 <BROADCAST,MULTICAST> …

Member Avatar for dwks
0
130
Member Avatar for eman 22

I have been written 2 classes A,B. and I want class A to use class B and vice verse but I have a problem when I tried to get the content of the class like(*A) that's my code. [CODE]#pragma once #include<iostream> using namespace std; class B; class D { B* …

Member Avatar for mike_2000_17
0
82
Member Avatar for Vivek0909

Here is the VC++ code [code]SVisFileDescriptor filedescriptor1; ZeroMemory(&filedescriptor1, sizeof(SVisFileDescriptor)); filedescriptor1.has_alpha_channel=CVisImageBase::IsAlphaWritten(); filedescriptor1.jpeg_quality=0; filedescriptor1.filename=currentpath1; pframe->SetTimer(22,5000,NULL); imageS1.WriteFile(filedescriptor1);[/code] This block is basically replicated in 3 different functions which in essence save 1 image EACH from a camera connected. I am not sure why this is happening. But my hunch is there is an overlap …

Member Avatar for mike_2000_17
0
234
Member Avatar for FoxInBoots

Hi, I've just started learning C++ and I have a problem figuring out an assignment. It would be really great if someone could please help me. :icon_cheesygrin: The program should look something like this: Input number: 6 (then the program should read out following) * ** *** **** ***** ****** …

Member Avatar for FoxInBoots
0
65
Member Avatar for andylbh

The code below is what I have done up so far. I'm currently trying to complete one of the 4 classes I have, so the codes are incomplete and made to work at it's current stage. Q1. I need to have 3 different sorting criteria: 1.Sort by X (asc/desc) 2.Sort …

Member Avatar for mike_2000_17
0
783
Member Avatar for QuesoTaco

I am using Microsoft Visual Studio 08 version on a computer where I do not have admin privileges. After building my project, I want to put the .exe into the Visual Studio 08's VC folder in order to run dumpbin from the command prompt, but it won't let me copy …

Member Avatar for template<>
0
549
Member Avatar for programing

waht the steps to make c++ compiler my compiler is to define - ,+ * / mathematical expresstion ? how i can make it plz :) i realy need help

Member Avatar for template<>
0
122
Member Avatar for ShadowScripter

[I][B]I'm[/B][/I] trying to load compressed images to a sprite object with C++, using a [URL="http://msdn.microsoft.com/en-us/library/bb174249%28v=vs.85%29.aspx"]LPD3DXSPRITE[/URL] and the [URL="http://msdn.microsoft.com/en-us/library/bb172802%28v=vs.85%29.aspx"]D3DXCreateTextureFromFileEx()[/URL] function to load it and of course [URL="http://msdn.microsoft.com/en-us/library/bb172867%28v=vs.85%29.aspx"]D3DXGetImageInfoFromFile()[/URL] to get some info, but I don't know how to go about it. How do I decompress them before loading them to memory and …

Member Avatar for ShadowScripter
0
208
Member Avatar for MixedCoder

[CODE]class Connection { public: typedef boost::shared_ptr<Connection> pointer; static pointer create(boost::asio::io_service& io_service){return pointer(new Connection(io_service));} explicit Connection(boost::asio::io_service& io_service); virtual ~Connection(); boost::asio::ip::tcp::socket& socket(); -->>>virtual void OnConnected()=0; void Send(uint8_t* buffer, int length); bool Receive(); private: void handler(const boost::system::error_code& error, std::size_t bytes_transferred ); boost::asio::ip::tcp::socket socket_; };[/CODE] when am trying to use virtual void OnConnected()=0; it …

Member Avatar for mike_2000_17
0
435
Member Avatar for andylbh

Line2D Points is made up of Point2D x and y Line2D.h [code] #ifndef LINE2D__H #define LINE2D__H #include <iostream> #include <fstream> #include <string.h> #include <ostream> #include <sstream> #include <cstdio> #include <vector> #include <set> #include <cstdlib> #include <ctype.h> #include "Point2D.h" using namespace std; class Line2D { friend ostream& operator<<(ostream&, const Line2D&); private: …

Member Avatar for andylbh
0
702
Member Avatar for eman 22

I want to declare template inside a class .h file [CODE]# include<stdio.h> # include<iostream> using namespace std; #pragma once template <typename T> class LeafNode { T records; LeafNode* next; int size; public: LeafNode(void); ~LeafNode(void); };[/CODE] .cpp file [CODE]#include "LeafNode.h" template <typename T> LeafNode::LeafNode(void) { } template <typename T> LeafNode::~LeafNode(void) { …

Member Avatar for eman 22
0
141
Member Avatar for strungoutfan78

I really need help on my latest C++ assignment. The program was due a week ago and I'm still beating my head against a wall here. This is supposed to be a VERY SIMPLE linked list implementation. I have rewritten this dang thing countless times in as many different configurations …

Member Avatar for strungoutfan78
0
518
Member Avatar for eng51

I am using Borland C++ Builder 5. I wish to use a TRichEdit component, and be able to programmatically add text to it, and be able to have different fonts/colors within the same line of text. I am able to change the font/color just fine, but only know how to …

Member Avatar for raptr_dflo
0
122
Member Avatar for annitaz

1. int i=1; 2. while (i <= n) { 3. for (int j=1; j<10; j++) 4. sum++; 5. i++; 6. } 7. for( int j = 1; j <= n; j++ ) 8. for( int k = 1; k <= n; k=k*2 ) 9. sum++; 1. How many times is …

Member Avatar for mrnutty
-1
162
Member Avatar for xXProgrammerXx

I wrote this script for my classmates where we shoot at each other, but after it compiles it says that there was an error and exits out. heres my script, if there is anything in there that needs to be fixed please help me. [CODE]#include <allegro.h> #include <process.h> #include <stdio.h> …

Member Avatar for xXProgrammerXx
0
198
Member Avatar for strungoutfan78

So I have this assignment to create a dynamic stack with template and I've got it nailed pretty much. My question, though, is: I tried to implement "stack2" originally with data type as string. It would not work. The compiler threw all kinds of errors. Could somebody tell me what's …

Member Avatar for strungoutfan78
0
169
Member Avatar for nightbreed

Hey guys! I'm trying to write a program that calculates the area of the convex hull of a set of points in a plane. I can find which points construct the convex hull but calculating the area is a little bit difficult for me. I guess the problem is that …

Member Avatar for nightbreed
0
1K
Member Avatar for Ertzel

I'm trying to create a Chat program for people to talk to each other through. So far I have it so multiple clients can connect to the server and send/receive messages to/from the server. The problem I'm having is because of the way Clients that are connected to the server …

Member Avatar for template<>
0
1K
Member Avatar for johans22
Member Avatar for Derek Elensar
0
108
Member Avatar for dina154

Hi, I don't know where i when wrong... But my program doesn't want to loop properly. I was ask to make a Simple calculator that will loop the ans till giving a exit. here is what i got... #include <iostream> #define NEWLINE "\n\n"; using namespace std; int main() { char …

Member Avatar for dina154
0
490
Member Avatar for shadowscape

Heres a interesting question for you guys, is it possible to check a file to see if its signed in c++ and if you wouldnt mind could you write me a function how to do this as it would really help alot, thanks. Kindest Regards, Nathaniel Blackburn

Member Avatar for template<>
-1
258
Member Avatar for FujiFilm

I deleted IDR_MAINFRAME256 and need to add it back to my toolbar folder under Resource View. How do I add it back.

Member Avatar for FujiFilm
0
27
Member Avatar for Tellalca

Hey; I have an assignment. My assignment includes the following tasks to be implemented under Linux: – Display a list of all available files (with their types) in the working directory, – Display a list of only regular files in the working directory, – Display a list of only directories …

Member Avatar for sergent
0
217
Member Avatar for PhysicsExpert

This worked in VC++ 6 but in Visual Studio 2010 assign needs a second parameter, in the context of this function would it be a better idea to use resize or reserve and why? [CODE] bool CN3ShapeExtra::Load(HANDLE hFile) { bool bSuccess = CN3Shape::Load(hFile); int iPC = m_Parts.size(); m_Rotations.clear(); if(iPC <= …

Member Avatar for PhysicsExpert
0
179
Member Avatar for qazerty23

Hello, I have two forms named are Form1 and Form2 (Form1.h / Form2.h) There are a textbox and a button on Form1 and Form2. When I click the button on Form1, it must show Form2 and when I click the button on Form2, it must fill the textbox on Form1 …

Member Avatar for sergent
0
128

The End.