49,761 Topics

Member Avatar for
Member Avatar for gispe

Hi ppl, I've written a simple program with strings. this just recives the name and last name of a person, and then print it. i had a few problems with this: at first, it didnt let me define a variable as "string", it gave this error: [code=cplusplus] C2679: binary '>>': …

Member Avatar for CoolGamer48
0
314
Member Avatar for neverness

Hello people, Alright, my problem is something like this. I've declared a nested struct within a class template, and i want one of the member functions of the class to return an object of type struct. Somehow, i seem to be unable to do this defining the member function outside …

Member Avatar for neverness
0
252
Member Avatar for anshulagarwal

hello freinds.I am anshul agarwal doing my summer internship in Germany. I am facing one problem in visual c++.. Actually i have done a project in borland c++ but because of memory constrain, I am forced to switch over to visual c++... My program is to read 5000 data from …

Member Avatar for VernonDozier
0
239
Member Avatar for krebstar

Hi guys, I'm having a little problem setting a string value to another string.. I have the class: [CODE] class FILENAME { public: string GetFullPath() const; void SetFullPath(string& fname); private: string fullpath; }; [/CODE] The declaration for the SetFullPath Method is: [CODE] void FILENAME::SetFullPath(string& fname) { fullpath = fname; } …

Member Avatar for krebstar
0
190
Member Avatar for brizhou

what code can i use so that if the coodinates of a mouse represented by symbol @ goes over coodinates of apples representedby symbols & and makes the & disappear on the grid? im thinking which would be more effiecient, the if or switch statement

Member Avatar for CoolGamer48
0
81
Member Avatar for chanda gul

Hi...can any1 help me in this code?? i am trying to read the content present at address 0x2c of memory of floppy...but i am having problem in this...please tell me how can i do this??? [code=cplusplus] #include "stdafx.h" #include "fat_32.h" #include <conio.h> #include <memory.h> #include <string.h> #ifdef _DEBUG #define new …

Member Avatar for Salem
0
121
Member Avatar for AlanZinober

This refers to instantiation and "uninstantiation". I need to solve an ode system many times with a varying paramter p in an iterative loop. It seems that I cannot use "out" and "ode" repetitively in the code below. The code works when N=1. Is there a way of "uninstantiating" and …

Member Avatar for AlanZinober
0
150
Member Avatar for conan19870619

i had a thought to write a program to play boggle. i already know how it works and decide to use a heap-based method. However, i just dont know how to write a basic step: look up a word in a dictionary. So,if i have a word "program", how can …

Member Avatar for Duoas
0
740
Member Avatar for cernette

Hello, I've got a simple program intended to read in one column of float data from a .txt file (with a variable number of lines) into a dynamically allocated array. The array contents should then be written to the screen, to test if this was successful. However, the code output …

Member Avatar for ArkM
0
106
Member Avatar for JaR

Hello! I tried searching for this error, but it seems a little uncommon, so I decided to register here. My problem is, that i would like to declare an iterator of type [ICODE]std::list<std::vector<T> >::iterator[/ICODE] within a for statement. I tried it like this: [CODE=C++]template <class T> class CSplit { private: …

Member Avatar for JaR
0
114
Member Avatar for murdercityriot

I'm having some problems getting some code (which I believe is compliant to the Microsoft C++ definition) to compile on CodeWarrior (which uses is ISO definition). I've sorted some of the syntax errors out but I'm stumped by this one: [code] inline T* GetNext(const T* a_elem) const { return (T*) …

Member Avatar for murdercityriot
0
94
Member Avatar for JaksLax

Here is the code I have [ICODE] #include<iostream> using namespace std; void push_t(int j) //--------------------------------------------------- // Accepts a value and pushes it onto the stack top // Precondition: if keyset = 0 the deque does not yet exits // deque is a structure with int j for data // Postcondition: …

Member Avatar for Salem
0
86
Member Avatar for 2fac323

I am writing a program that lists a breakfast menu with prices and lets the user make an order. I am stuck on a few points and need some advice to get the program to run correctly. The first problem, I can only get amount due to calculate the tax. …

Member Avatar for 2fac323
0
102
Member Avatar for jack1234

In java we can use System.out.println In C# we can use Debug.Println but how to do it in C++? (The syntax, and where to look for the debug message)

Member Avatar for bugmenot
0
3K
Member Avatar for mehtaneha84

My question might be very basic but I really do not know how to do this... I need to create a structure, something that looks like a protocol (a data packet actually)...this packet consists of 3 parts header, data and trailer... The header has 3 offset bytes, 64 bytes of …

Member Avatar for mehtaneha84
0
440
Member Avatar for ninjaneer

Hello again, daniweb. I have created a managed C++ GUI using windows forms that needs to call some functions in an unmanaged C++ DLL that was created by the MATLAB compiler. The functions from the MATLAB compiler need to be run in their own thread in the background while input …

0
79
Member Avatar for CPPRULZ

I know this is probably a very stupid question, but I can't make the user input a string.I thought I could use cin...here is my code: [code=C++] #include<iostream> //#include<cstdlib> //#include<cstdio> #include<cstring> using namespace std; int main() { int x=0; string thing[10]; cin>>thing; //x=atoi(thing.c_str()); //cout<<x; system("pause"); return 0; } [/code] I …

Member Avatar for CPPRULZ
0
152
Member Avatar for kwesicat

Hi Every One, I am working on an assignment that needs to be submitted on 08-08-2008. The IDE in use is Dev-C++ 4.9.9.2. Basically, everything works well untill the program calls for values which are not avalable for a given energy 'energy[0]'. It will run but at these points it …

Member Avatar for kwesicat
0
109
Member Avatar for coveredinflies

Hi, just came across character escape sequences e.g '\a' The "alert" character, ` `\b' Backspace, `\f' Formfeed, `\n' Newline, `\r' Carriage return, `\t' Horizontal tab, `\v' Vertical tab, ` I can only get some of them (new line and horizontal tab) to work. Do you have to do something special, …

Member Avatar for Duoas
0
117
Member Avatar for sahmedsa

I always see solutions to some questions regarding classes, and they have (*this) , I don't understand when to use it and how to use it. Does it just mean that we're referring to something? Please help me out. (an explaination with an example would be helpful) Thanks

Member Avatar for Duoas
0
71
Member Avatar for Nemoticchigga

I am trying to run a simple program to read ethernet using UDP. Here is the code, but it always receives -1 for 'error', but I did it by the book. Do you guys see the problem? Thanks. [CODE]//enum specifying the current status of the comm port. enum e_PortStatus { …

Member Avatar for Salem
0
117
Member Avatar for arun_lisieux

Guys, Im not very experienced in C++. I was practicing problems from topcoder to improve my knowledge in C++. I've posted the code i used for solving a problem statement given by topcoder website. The compiler tells that there is a linking error with this code and hence its not …

Member Avatar for ArkM
0
249
Member Avatar for Corum

The circular list code is incomplete program with lots of feature missing, it's only one specific section that I require help with but I thought it would better to show the entirety of it to help you understand better. The section surrounded by -------------------------- is where I'm stuck, basically the …

Member Avatar for Corum
0
131
Member Avatar for besktrap

So, I'm making a simple program that can edit text files. I have a text input that says "Please enter the name of the file, followed by a '.txt'. ". Although, whenever I enter a name, it will only show you the first character of what you entered. So, how …

Member Avatar for VernonDozier
0
96
Member Avatar for Sana nawaz

Instructions Please read the following instructions (related project code) carefully: You'll be expected to observe good programming standards. • Project code must follow C++ syntax • Data used in each project must be retrieve and saved in Text Files • Your project may cover the concepts learnt in CS201 particularly …

Member Avatar for VernonDozier
0
148
Member Avatar for tootypegs

Hi, i think i have a pretty random question here and something i thought i would be able to do but unfortunately im struggling. I have an example I have found on the msdn website. It works fine however i want to move all the code so that it just …

Member Avatar for mitrmkar
0
107
Member Avatar for richM
Member Avatar for richM
0
43
Member Avatar for FTProtocol

I haven't posted in a while as i've been getting better and better at solving problems myself but im starting a new project. Basically what it does: - Runs continuously in the background - Done - When IE or Firefox is opened it begins the main loop - Needing process …

Member Avatar for William Hemsworth
0
131
Member Avatar for NickyU

I start a new thread about this. I need just a piece of code that reads a bmp file. I [B]NEED[/B] this. Every program i made used custom graphic files, and a very unpractical graphic editor made by me . It would be more comfortable to use paint to make …

Member Avatar for NickyU
0
112
Member Avatar for NickyU

i use an older compiler, borland c++ 3.1 and it doesn't have the bool variable type so i made my own bool type [code] enum bool { false = 0, true }; [/code] but always when i try to make comparisons or other thing i get the warning ASSIGNING INT …

Member Avatar for NickyU
0
244

The End.