49,757 Topics
| |
Hi everyone, I'm running a c++ program using VS 2010. But during a debugging, the output DoS window disappears when a problem happens. How to stop the output window? I know the problem could be solved by using run-cmd-*.exe. But is there a direct method? I mean, by configuring VS … | |
| Hello all, I am trying to finish an assignment in my programming class and I can't seem to get this compilation to work... For some strange reason the program will not sum the elements in the array... It is only returning the first input that I enter... Any hints??? I … |
Past paper question from 2007: Source University of Cape Town - CSC2001F - 2007 Which of the two statements shown below will provide an lexicographical (alphabetic) string comparsion? why? [code=C++] char *mesg1 = "Hello", *mesg2 = "world"; string s1 = "Hello", s2 = "world"; if (s1 != s2) {...} // … | |
Hallo all. Iv spent a lot of time browsing through the old threads and I cannot find a solution to my problem. Please help... I have to files H:\me.txt and H:\you.exe and I want to write a code in Turbo C++ to open these in a separate window, meaning I … | |
Hello, I have a simple question. Look at the following code: [CODE]class ClsA { int * var1; ClsA(); ~ClsA(); } ClsA::ClsA(){ var1 = new int [10]; } ClsA::~ClsA{ delete [] var1; cout<<"Apel destructor"; } void funct(){ ClsA ** p = new ClsA * [10]; ..... delete [] p; }[/CODE] When … | |
I am sorry to bother people with silly questions, But I have no choice. I have a statement unsigned short a=4000, current_word; current_word=a << 3; Then I have another statement unsigned long a=4000, current_word; current_word=a << 19; According to my knowledge they will contain the same value. Am I right? | |
hi all... I am a student and but working as a php developer...my desire is be a good skillful Software Engineer. I am currently following php and java too. but my mind say try to learn C++ also.. ok good 01. How I start my C++ career. 02. What is … | |
hey guys i am trying to do one level of undo ..however its not working correctly..it does display the text but x and y axis gets messed up..any help and suggestion be great thank you [CODE]void undo(pixeltype pixels[], int length, int option) { struct temp_pixels { int x; int y; … | |
I'm trying to get the key being pressed in order to start an algorithm and afterwards move the mouse on the screen and perform some clicks. How can I achieve this when the console is in the taskbar ? I tried _getch() but it doesn't work while the console is … | |
Hey Guys, Recently ive been developing a text editor when i came to stop. [ICODE]system("cls"); cout <<"\t\t-------------------------------------" <<endl; cout <<"\t\t| NEW FILE |" <<endl; cout <<"\t\t-------------------------------------" <<endl; cout <<"\t\t|Enter New File Name| "; getline(cin,createfile); cout <<"\t\t----------" <<endl; getline(cin,text);[/ICODE] here getline accepts code only until one press enter key How to … | |
hello..i'm learning winsock programming in C/C++ and i need to use https connection for connecting to a server..could anyone tell me what does that mean and how do we implement it in a client program?? thanks | |
Please help me solve this problem, I've spent 2 days to search for what error is but I can't!!! The operator + return error object though this object was still right before it is returned. Maybe it's because of the copy constructor but I find no doubt in its syntax... … | |
Hi, I've been learning basic C++ for the past few days, and at the moment, I'm trying to make a basic 2-number, plus/minus/multiply/divide calculator. Here's what I have (it's complete). Basically I was wondering if anyone could recommend a quicker or shorter way of typing all of this out. Thanks … | |
Hi, I have a game that at the moment is a little like mario- a jump and run. I want to add a timer to my main funtion so that after 60 seconds or so the game ends and goes to a highscore table where you can enter your name … | |
Ok, I'm probly going to sound like a bit of an idiot, but I'm new to the programming world. Whenever I attempt to run this program, I get a long list of error messages. //DATATYPE.CPP //Examples of variable declaration and //initialization. #include <iostream> main () { //declare a constant for … | |
Hi guys: I am trying to run my makefile on my system. I am getting the following error [CODE]% make cc -c -O -I/Users/gcardonav/jpeg-6a -I/Users/gcardonav/cfitsio FITS2jpeg.c In file included from FITS2jpeg.c:26: jpegsubs.h:28:20: error: malloc.h: No such file or directory make: *** [FITS2jpeg.o] Error 1 %[/CODE] I do a search for … | |
i have been following this tutorial on [URL="http://jnrdev.72dpiarmy.com/"]http://jnrdev.72dpiarmy.com/ [/URL]number 3. I am using SDL with visual C++ i want to add a timer to this code then after the timer has run out i want the game to go to a highscore table where you can enter your name if … | |
Hello everybody, I would link to represent a graph with incidence lists. This picture is what I've thought about: [URL="http://img697.imageshack.us/img697/2640/incidence.jpg"]http://img697.imageshack.us/img697/2640/incidence.jpg[/URL] This is what I created: [CODE] #include <cstdlib> #include <iostream> using namespace std; class Edge; class Pointer; class Node { public: Node* nNext; Pointer* incList; char First; Node(char a) : … | |
Can someone check my work to make sure I did the following correct... The array-based implementations of stacks in this section impose and upper limit on the max size that a stack may have. Write a member function full() for the stack class that returns true or false according to … | |
Can someone please double check to make sure I have these right. Here are the instructions... Assume that q is a queue implemented as described using circular array with queueElement = char and capacity 5, and then ch is of type char. Show the values of myFront and myBack and … | |
I am doing some stack exercises and just want to make sure I have the correct answers. Assume StackType is sent to int and STACK_CAPACITY is set to 5. Give the values of myTop and the contents of the array referred to by myArray in the stack s after the … | |
Hi, I am making application where I need to repaint windows form where I display some variables. I used InvalidateRect(NULL,0,0); - now the form is refreshing but started to blink because I refresh whole area,and I dont need to refresh all the buttons and static text ,only area where I … | |
I am trying to create my first library and I guess the dynamic library is the best suited, though I don't know the difference between the two. I am following this tutorial: [url]http://msdn.microsoft.com/en-us/library/ms235636.aspx[/url] My questions are: 1. So pretty much I make my header file and a respective cpp file … | |
I'm trying to translate a Pascal mouse movement algorithm to C++ but I'm not too good at it. The mouse moves to a position but when it moves again it only goes a small increment and crashes after a few more moves or if I move the mouse a few … | |
I've been trying to disable the desktop ( in its entity ) so that no window can get focus and I can draw on top of it. Since creating a fullscreen window and drawing on that will lag all the other windows. Ive tried WM_ENABLE and EnableWindow with the handles … | |
I need help creating a delete function for binary tree. This is what I have so far... (Last function is what I'm working on) [CODE=C++]#include <iostream> #include <cassert> namespace CS61 { template <class Item, std::size_t MAX> class btreenode { private: std::size_t used; // actual number of values in this node … | |
Hello, I wonder how it works when you want to send an email through a proxy server. I have code below that works if you want to send an email through for example smtp.gmail.com etc. I have put the proxyserver address and port that the proxyserver has as the 2 … | |
Hi guys.I thought about it for a while but i didn't get anywhere.Is there any alternative to polling? | |
I am trying to pass data into a class object and the put that class object into a binary tree. My code was mostly give from the professor, but I am stuck on this part. He gave us the binarytree.h and employee.h. I had to create the emp_tree.cpp. Employee.h: (give … | |
i have declared a variable as uint32_t num; when i take input for this variable i.e cin>>num; cout<<num<<endl; & take its cout, then it gives problem. when i run this program, i gives num value as 12345678, it works fine & give cout. but when i give input as 1234abcd. … |
The End.