49,766 Topics

Member Avatar for
Member Avatar for lostangel556

Hi Everyone. Apologies for the length of my first post but this one has perplexed me an bit in my project. Im creating an Windows Media Player Visualization in VS2008 and am drawing an blank on the below. What i need to do with the below code is to create …

Member Avatar for nezachem
0
205
Member Avatar for Rajasekhar33

Hello sir, This is Rajasekhar murthy.... I want a c++ program on files i.e.., write a c++ program to eliminate blank space ,comments, tabs in a given file. I am waiting for your reply sir..........

Member Avatar for Salem
-2
73
Member Avatar for johndoe444

Is this possible to declare a template struct similar to template class: [CODE]template<class type> typedef _stack { type arr[MAX]; int tos; } stack;[/CODE] Thanks.

Member Avatar for mrnutty
0
132
Member Avatar for Androggles

Hey :) I wonder how i can make my program make a shortcut to itslelf, and put it in a specific directory?

Member Avatar for Androggles
0
1K
Member Avatar for a7med sh

Can any 1 help me or give me a tip i know that i have some mistakes what I want to do is : - Read the input until eof keeping track of each letter that occurs in the input as well as the number of occurrences of that letter. …

Member Avatar for jonsca
0
144
Member Avatar for OffbeatPatriot

I've been trying to read this binary file I wrote with a python script. The format of the file is this, first there is an integer that tells how many floating point numbers follow that integer(there will be 5 times this number), then the floats follow, another integer, etc. I've …

Member Avatar for Ancient Dragon
0
146
Member Avatar for belle phoenix

[code] #include <iostream> #include <fstream> #include <cstdlib> // to clear the screen #include <cmath> #include <string> using namespace std; #ifndef NULL #define NULL 0 #endif int MAX_FLOOR=10; struct passenger { int id,waitingtime,timestamp; float source,destination; passenger * next; }; struct node /*this is the linked list that contains source and destination …

Member Avatar for Agni
-3
319
Member Avatar for jigglywiggly

So ok, I have been doing like java for a year and a half, and this is my lovely 4th day of C++, and I have already read up on pointers, dynamic memory and all that fun stuff. I do know what the header file class does. However I got …

Member Avatar for Agni
0
157
Member Avatar for froggy1976

Here is what is required: Create a new console application project and name it "Week1Lab_YourName". Create a new class called DayOfTheWeek. The class should have a data member that can store the day of the week such as Mon for Monday, Tues for Tuesday etc... STEP 2: Create the member …

Member Avatar for C++Rookie
0
190
Member Avatar for biesczadka

I have a template which can be initialized with container list, vector or my own create container zbior and struct element as an El: [code] template<typename El, int colsNo, typename Container> struct CSVReaderWriter { Container m_cont; void read (std::istream & _input) { string linijka; vector<string> entry; string laaa, naa; int …

0
65
Member Avatar for cyberguy007

Can someone help me create a function to print all items with a Prod_Stockcount less than 5? Its missing some code but all you need is to add and then create a function to print items with stockcount less than 5 [CODE]# include <stdio.h> # include <string.h> # include <iostream> …

Member Avatar for jonsca
0
115
Member Avatar for SasseMan

Hi, I have a problem with two classes who both has instances to each other. Here are the header files... [code] #ifndef ENVIRONMENT_H #define ENVIRONMENT_H #include <vector> #include "item.h" #include "actor.h" namespace game{ class Environment{ public: Environment(){} Environment(std::string name_, std::string description_); enum directions { north = 0, north_east = 1, …

Member Avatar for Ancient Dragon
0
113
Member Avatar for ishaiman

HI, i am the student of MIT. C++ is my subject. I feel confusion in FUNCTIONS. can you help me? > It works if you get rid of `getline(inFile, Library[i].genre);` I didn't try it but it might have worked with `inFile >>Library[i].genre`, but mixing getlines and >> can cause trouble. …

-2
45
Member Avatar for pcpp

hello , i am starting to program my project in c++ i need help in direction. my project is like wikpedia . i should enter about 3 value in each catagory (3*7) . the search will be by pressing some value and then a list will open with all the …

Member Avatar for VernonDozier
0
106
Member Avatar for subscriptions

Hi, I tried compile the VC++ project in visual studio 2008. I'm getting the error "the null device is missing from your system". I tried viewing non-plug and play drivers for Null device. But could not find it. Could anyone help me to fix this issue. I'm using Vista Home …

Member Avatar for Ancient Dragon
0
44
Member Avatar for jakesee

Hi, I am playing around and trying to understand template singleton class and I accidentally created something that I am surprise it even runs. What I don't understand is when did Apple and Orange instances get created? Could you also comment on the good and bad of the Singleton class …

Member Avatar for jakesee
0
484
Member Avatar for flying_bird

Hi guys, The following code doesn't compile, and I've been banging my head why. Some header code: [code] template <typename T, typename LESS_THAN> class RestrictedSet { private : int _size; int _max_size; set<T, LESS_THAN> _S; typedef typename std::set<T, LESS_THAN>::iterator tIt; public : RestrictedSet (int max_size); RestrictedSet (RestrictedSet<T, LESS_THAN> &other); ~RestrictedSet …

Member Avatar for flying_bird
0
768
Member Avatar for Excizted

Hi people. :) I'm making a function callback system for a console, so I would dynamically be able to send a function pointer to my console class, and then it would be callable from the console. Well, it works - but only with functions that are not member of a …

Member Avatar for Ancient Dragon
0
257
Member Avatar for pac-man

Hi guys, just playing about with pointers and keywords and to my surprise, this code does not throw up an error... can anyone tell me why? [CODE] int main() { int *P = new int; *P = 50; cout << *P << endl; // output: 50 delete P; *P = …

Member Avatar for pac-man
0
124
Member Avatar for Slammer

Hi there. I need to write a recursive DFS function for graph which is implemented as follows: [CODE=c] struct nodes_arr { unsigned int position[50000]; unsigned int amount[50000]; node *next[50000]; } nodes_table[] = {0};[/CODE] [CODE=c]struct node { unsigned int position; unsigned int amount; node *next; };[/CODE] as a result i have …

1
111
Member Avatar for Noor Ur Rehman

i am Noor.Student of computer science.this website is very helpfull for programmer students.all my friends likes your site and coopration. I HAVE AN ASSIGNMENT (structure of students using array sorting, fuctions and using pointers to display students in sequence order) SUBMISSION DATE IS 14/1/2010 PLZ ANY BODY HELP ME. THANKS …

Member Avatar for SgtMe
-5
82
Member Avatar for mellowmike

I wasn't sure whether to put this question here or in the Windows section, but I was wondering if there was a way to put images into a Visual C++ project. That way, I won't have to load an image from an outside directory, and it will already be in …

0
57
Member Avatar for cwarn23

Hi and I am making a dll but the dll won't accept pointers due to what it links to. So below is my code and does anybody know how to make a string array without pointers? Also I'm using Visual c++ 2008. [CODE]//#pragma warning(disable:4996) //disable "depreciated function" warnings #include <windows.h> …

Member Avatar for Ancient Dragon
1
204
Member Avatar for Szabi Zsoldos

My question is the following, i'm just figuring out this language, now my question is about the "n" number. What is the role of n<5, i know after this condition it continues the for or not. But i can't find the precise explanation of the "n" . Thank you. Why …

Member Avatar for WaltP
0
72
Member Avatar for rehamz

i want to know how to make trace to my program in Microsoft visual c++ 6. thanks

Member Avatar for Ancient Dragon
0
56
Member Avatar for jegadees

Hi, I am trying to work out a simple code in C++.I am getting the input as a string and the output should be reversed.Some thing like this input ="Glitters are Not gold" output should be "gold Not are Glitters". What i have done is get the string and stored …

Member Avatar for mrnutty
0
139
Member Avatar for ge6a93

Hello, i'm using VC++ 6.0 with MFC library and i want to load PNG images in my dialog based application. Can anyone help me??? Thanks in advance!

Member Avatar for vmanes
0
61
Member Avatar for CppBuilder2006

I need an API function that disconnects the computer from internet! does type of connection matter? eg dial up, adsl or.. :)

Member Avatar for CppBuilder2006
-2
581
Member Avatar for tinkeydo

[CODE]#include <iostream> #include <windows.h> #include <fstream> #include <string> #include <ctime> #include <vector> using namespace std; bool fileCheck(const char *filename) { ifstream ifile("item.txt"); return ifile; } int show(int p) { srand( time(NULL) ); int random_integer; random_integer = ( rand ( ) % p ) + 1; return random_integer; } int main …

Member Avatar for tinkeydo
0
396
Member Avatar for flying_bird

Hi guys, I am looking for an STL solution for the following problem. The desired behaviour is the following: - It should act as a priority queue - When an item is added, the item with the *lowest* priority should be dropped. I thought of doing that by making a …

Member Avatar for flying_bird
0
170

The End.