49,761 Topics
| |
Hey. I'm trying to simply input items into a list, then be able to sort them and do whatever. I've done this before for my previous classes, but we have we have to use class files out of the book and modify them to make this work and I'm having … | |
Hello :-)! There is a problem with building project in NetBeans. I've got two directories sphinx4-1.0beta3-src and sphinx4-1.0beta3-bin, which are part of speech recognition system CMU Sphinx, Sphinx4 is written in Java. In the directory S:\tutorial\sphinx4-1.0beta3-bin\bin I've got some .jar files, e.g. HelloDigits.jar. In S:\tutorial\sphinx4-1.0beta3-src there is no bin directory, … | |
Hi, I have a question. Using the following code: [code=c++] #include <iostream> int main() { std::string s1; std::cout << s1.capacity() << std::endl; system ("PAUSE"); return 0; } [/code] In Ubuntu/KDevelop the output is 0. In Windows/V.Studio the output is 15. Can anyone suggest why it happens? I'm somewhat stumped by … | |
Hi guys, I was hoping someone could explain to me how I would go about grabbing a pointer/reference to my variable 'textName' contained within the Reports class, (some code omitted to try to simplify the scenario) [CODE] //Reports.h class Reports : public wxPanel { public: void AddStudent(wxCommandEvent & event); wxTextCtrl … | |
Hello.. Ive written this code which dont work, its jobis simply recieving names from the user in a structure [a] and delete a name that chosen by user, the compiler give me error flag in the line noticed bellow:) [CODE]#include <iostream.h> #include <conio.h> struct m{ char n[15]; }; void main() … | |
Is it possible to have software lock itself till the user completes a form on a web page? The user installs the software, then a splash screen pops up and their web browser opens to a predefined page. The page is a form that needs completing. Say the form is … | |
Hi, I need to produce an xy matrix on screen of tiny boxes, each equivalent to 2.5 x 2.5 mm. I want to group them into sixes. When the mouse pointer is moved across the tiny boxes in any six group I want the program to register when the mouse … | |
The following code works, it prints hello world. Also, depending on the second value, it either gives segmentation fault or doesn't gives segmentation fault. Can someone please explain me what is happening internally. [CODE] int main = ( cout << "Hello world!\n", 195 ); [/CODE] | |
hi,i am making trees and i want to draw the structure of the tree in windows forms applications.since the class tree has the access to the trees root pointer.so only a member function of the class can draw the nodes of that tree. but i cannot use the graphics pointer … | |
I was having problems with this program or better with the int main() function. The program is supposed to ask the user for his name and password. After that the user will be able to access different infos based on his security clearing. The comments in the code are English … | |
Hi there, I'm assuming the answer to this problem is really easy, but I just can't work out where the problem is. It's driving me insane and I'd really appreciate some help. I'm new to C++. My problem is this: I'm trying to pass a char array to a function, … | |
hi..i am writng a program.....i have collected a lot of information(name,hobbies etc.....) of about a hundred students in my school.......i have also stored their photographs in .jpeg format.........i am using Dev c++ and windows xp..........i want to store all this info + photos in a single file....how do i go … | |
hello guys here is a problem when i was written a simple demonstrative linklist program i got the[B] general protection error[/B] ([B]**one more question i need ur guide i have the turbo c++ compiler but this does not support when i write #include <iostream> using namespace std; plz tell me … | |
I have created a linked list in Java, and now I am trying to convert my program to C++. When I try to compile, it gives me the error saying that 'next' uses 'CarNode' which is being defined. I am wondering if there is any way around this? Java: [CODE]public … | |
| Hey everyone. I first post and I couldn't figure out how to encase my code, sorry. Let me know and I'll do it next post. Anyways, I've built binary tree using recursion and included a function to print out the sum of the level of the tree of a given … |
Hi, I am creating a Visual C++ application with a bunch of forms. I would like one form to stay open the entire time (just a screen to show app is running), then I need one form with two radio buttons, an OK button and a Cancel. If the OK … | |
Hi all, I am trying to write code that will read from a file that is set up as an inventory file. So, on each line you'll have something similar to: 1. Toothpaste 2. Toothbrush etc... The problem I'm having is saving the numeric item number into one array index, … | |
I have already done most of the program, ask the user for the move, see if it is a valid move, make the move, test if the perimeter is full, etc... but now I see myself troubled with testing if someone has won the game, I could just make a … | |
Hey guys, I justs started this code to make a diamond with stars (*), but I get confused how to print the spaces that I need, I don't know if you understant what I'm trying to say. It is something like this: Prompt the user to enter (odd) height (of … | |
I have to submit this project by this weekend.Please help me. | |
I tried looking at the other examples on the site, but I still get segmentation errors whenever I run the file. I need help with the constructors in [B]bold[/B] in the "List" class. [CODE]#include <iostream> using std::cout; using std::endl; // forward declaration of List class, so ListElement can make // … | |
Hey guys, I'm about to start on a research project about multi-threading. I'm very comfortable with c++ oop/data structures concepts, but am completely new to programming with multiple threads. Does anyone have suggested resources for me to get started? | |
When I try to compile my code, I get this error: [code]------ Build started: Project: SUD, Configuration: Debug Win32 ------ Compiling... baseent.cpp c:\program files\microsoft visual studio 9.0\vc\include\xmemory(52) : error C2558: class 'BaseEnt' : no copy constructor available or copy constructor is declared 'explicit' c:\program files\microsoft visual studio 9.0\vc\include\xmemory(155) : see … | |
Hi friends; I've run into a problem trying to complete the below assignment: Write a function called myName which returns (does not cout) your full name (e.g., "Bob Smith"). Write main to call the function and display the name on the screen. NOTE: Your name should not appear anywhere other … | |
Hi I want to display a variable menber array queue, and the definitions of the class are The Array.h template <class DataType> class Array { public: Array( int size ); private: T *ele; }; The Array.cpp Array<T>::Array( int size ) { if ( size < 1 ) { capacity = … | |
I'm trying to advance my understanding of how computers and compilers work. Given the C++ program bellow with exceptions and runtime typing turned off and no optimizing that removes main or makes it into a non-standard function. [code=c]int main() {return0;}[/code] Produced an disassembly with the following code for main: [code=asm]pushl … | |
I am trying to increment 2 variables in a for loop and i want the loop to exit when the highest value variable is reached My example [B]a [/B]gets the first element of a vector and [B]f [/B]gets the next. It needs to keep doing that until [B]f[/B] reaches the … | |
My array keeps outputting this random character (kind of like a # in a box). Anyways, its just garbage really, but how do i stop it from doing this. If my array was like char title[10] and the user inputted something with only 5 characters, then the remaining characters would … | |
Well I think title says it very well, how do you think, is it good option to make program with GUI? | |
I have an function in which I want to make a copy of an object. [code] ClassBase { public: Tblk myTblk; private: }; void ClassBase::CopyObject(const ClassBase &test) { TblkPtr_t myTblk = TblkPtr_t(new Tblk); //TblkPtr_t is a typedef shared pointer *myTblk = *test.myTblk; } [/code] For some reason that doesn't work. … |
The End.