49,761 Topics
| |
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 '>>': … | |
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 … | |
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 … | |
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; } … | |
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 | |
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 … | |
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 … | |
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 … | |
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 … | |
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: … | |
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*) … | |
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: … | |
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. … | |
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) | |
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 … | |
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 … | |
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 … | |
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 … | |
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, … | |
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 | |
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 { … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
which library can i use to scan folders for file in UNIX help please!!:'( | |
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 … | |
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 … | |
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 … |
The End.