49,761 Topics

Member Avatar for
Member Avatar for GeekPlease

Good day folks, Can anyone tell me why my code only accept the first word of the input. E.g., I input Ana mae.. The output will only consider Ana as my input hence it will produce like Hello, Ana! #include <iostream> #include <string> using namespace std; int main() { string …

Member Avatar for GeekPlease
0
185
Member Avatar for Alex_13

**nestedTriangles.cpp (attached) description:** The program takes as input a pair of triangles, specified be giving the coordinates of each triangle's vertices. It then determines if either triangle is "nested" within the other, meaning that one triangle lies entirely within the interior of the other. **Pseudocode:** One triangle lies within another …

Member Avatar for rubberman
0
462
Member Avatar for shea279

k so essentially have this code [CODE]HINTERNET hInternet; HINTERNET hFtpSession; hInternet = InternetOpen(NULL,INTERNET_OPEN_TYPE_DIRECT,NULL,NULL,0); hFtpSession = InternetConnect(hInternet, "ftp.freetzi.com", INTERNET_DEFAULT_FTP_PORT, "myuser.freetzi.com", "mypassword", INTERNET_SERVICE_FTP, 0, 0); FtpPutFile(hFtpSession, "C:\\log.txt", "mylog.txt", FTP_TRANSFER_TYPE_BINARY, 0); if(FtpPutFile(hFtpSession, "C:\\log.txt", "mylog.txt", FTP_TRANSFER_TYPE_BINARY, 0)){ MessageBox(NULL, "Successfully uploaded log to ftp server!", "Ftp Upload", NULL); }else{ MessageBox(NULL, "Couldn't upload log to ftp …

Member Avatar for mohd_1
0
1K
Member Avatar for chetanbhasin

I am looking for an HTTP server in C/C++ that can take data from another application and send it over the network. My basic motive is to create a command line application which takes a request type/id as input frmo the web server and generates an output which it gives …

Member Avatar for Ancient Dragon
0
638
Member Avatar for chetanbhasin

I recently tried compiling an example linked at Mongoose project's website using code::blocks and got certain errors. As I do not know where I went wrong I will list everything that I did in the process. 1. Created a new C++ console application project in Code::Blocks for Windows 2. Copy …

Member Avatar for Ancient Dragon
0
651
Member Avatar for ALi Tahir Khan

1.writte a program that generates output 10 20 30 Generate by using 10 2.write a program that take age from a person and converts into months and days . Please Help Thanxx

Member Avatar for deceptikon
-1
170
Member Avatar for lewashby

In the following small c++ program I'm trying to add '0' (zero characters) until the number of characters in the users input can be evenly divided by 3. I'v got it working except that it doesn't work when only on character is feed to the program. input -> 123 -> …

Member Avatar for vijayan121
0
179
Member Avatar for mbatipen

I'm a novice in c++ and intend to carryout a project on automatic control of an egg incubator. This project is to be used as an end of course defence. Soebody should kindly give me a c++ code for a temerature and humidity sensors. This will be used to programme …

Member Avatar for mbatipen
0
214
Member Avatar for talha.nehal

I use Dev 5.4.1 and so far I have not found libraries which work properly for making user-interface. Allegro or graphics.h or QT or some other libraries. For Qt I have heard that you need another IDE What about the others

Member Avatar for mike_2000_17
0
340
Member Avatar for Israel_1

Hi I need help with finding the area underneath a curve. Here is what I have so far; #include "stdafx.h" #include <iostream> #include <string> #include <cmath> using namespace std; struct term { float coeF; float exP; char name; }; struct function { int size; term terms[10]; }; struct Integral { …

Member Avatar for Israel_1
0
1K
Member Avatar for tiff2013

I have created a calcuator that takes in single ints and appends them together to make larger numbers and can do basic functions. Now I have to take this program the .cpp and the .h files and convert them to allow decimal point numbers. I am thinking about changing all …

Member Avatar for tinstaafl
0
129
Member Avatar for hahanottelling

Can anyone help me with displaying text in a C++ window? I've read the chapter 9 at winprog but it makes no sense to me. here's the code I'm using: [code]#include <windows.h> #include "resource.h" /* Declare Windows procedure */ LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM); /* Make the class …

Member Avatar for Nick_3
0
5K
Member Avatar for nitin1

int a=3; cout<<a++<<" "<<++a; what is the expected output of this problem ? It is undefined behaviour as it is updating value of "a" once more than once in a sequence point ? Correct me if i am wrong at any point. thanks if you can help me.

Member Avatar for vijayan121
-1
218
Member Avatar for hussein.gwadya

c++ program to compute the ammount due when a car parks in a parking lot according time taken. Customers are charged $0.75 for each full hour

Member Avatar for JorgeM
0
83
Member Avatar for NathanOliver

I was reading some articles on cplusplus.com and for kicks I read the template tutorial. At the very end of the section there is this paragraph: Since no code is generated until a template is instantiated when required, compilers are prepared to allow the inclusion more than once of the …

Member Avatar for vijayan121
0
157
Member Avatar for ohnbabygal

im tryin to compare the time it takes to calculate squareroot by the stdlib function and recursive function. everythin's workin good except the TIME thing. its givein me the same time. wat is wrong??? plz help me find it.. thank you guys! #include<iostream> #include<iomanip> #include<cmath> #include<cstdlib> #include<ctime> using namespace std; …

Member Avatar for cnplane
-1
161
Member Avatar for andrew.mendonca.967

Write a program to read the coefficients of a series of quadratic equations from a text file and print the associated roots, or appropriate errors if there are no real roots, to another text file. If a == 0, no solution, and if (b2-4ac) < 0 it has only complex …

0
149
Member Avatar for FriXionX

I was reading through some C++ code, and I noticed if(;;). I've tried to Google it and even search on here, but it seems to ignore the brackets in searches. Obviously I know what an if statement is, but what do the ;; mean inside the brackets? EDIT: nevermind, as …

Member Avatar for NardCake
0
206
Member Avatar for NardCake

Hello everyone! Recently I have been incredibly interested in language design/implementation. I have written multiple functioning language front ends (Lexer, Parser, some execution) and have decided a few things. My systems are getting ugly, there needs to be more abstraction I can't execute code in the parser -- it's just …

Member Avatar for NardCake
0
320
Member Avatar for Lp_baez

Hi Everyone, Sorry to be such a noob, but I am hopping you guys can help me out a bit. I keep on getting this error "expected an expression error" in the first open curly brace of the 'void playerCMD();' function and also in case 1. I am using the …

Member Avatar for cambalinho
0
190
Member Avatar for triumphost

Should I be using std::wstring or std::string and wchar_t or char? All this unicode stuff is confusing me. I want my application to work on both windows and linux without too many problems and changes but I'm considering unicode vs. ansi. Any ideas? I ask because I see many applications …

Member Avatar for vijayan121
0
1K
Member Avatar for vishalonne

What I know is Linear Search and Sequential Search are same, if my knowledge is correct then kindly guide me wether the below algorithm work for linear search or not as it is a Sequential Search algorithm. > Step 1. Initialize searcharray, searchno, length. > Step 2. Initialize pos=0. > …

Member Avatar for deceptikon
0
214
Member Avatar for pdwivedi

Hi all, I want to create all possible combinations of a full binary tree which must have exactly 4 leaf nodes and 3 internal nodes. I want to create it using recursion and tree must be simple binary tree not a binary search tree or BST. Kindly suggest algorithm to …

Member Avatar for pdwivedi
0
493
Member Avatar for jackmaverick1

I've been working on a small API/Library and I realized that I was returning memory that wasn't going to be consistently put on the heap or stack. So my question is this: when I return an object from a function in a Library, should that object be on the heap? …

Member Avatar for mike_2000_17
0
238
Member Avatar for pankaj.leon

> WE'll be taking inorder traversal of the tree and during the traversal will modify the right pointers only(using method "make_right") such that a linked list is formed having only valid right pointers. Then another method "make_left" is called to make the left pointers of the nodes point to valid …

Member Avatar for pankaj.leon
0
202
Member Avatar for vishalonne

Hello Everybody I am successful in displaying Diagonal Array elements, but failed to display Non Diagonal array elements I tried a lot but unsuccessful. Here is the code what I am try with - #include<conio.h> #include<iostream.h> void accept(int a[4][4],int size) { cout<<"Diagonal One:"; for (int i=0;i<size;i++) for(int j=0;j<size;j++) if (i!=j) …

Member Avatar for vishalonne
0
212
Member Avatar for Elixir42

Hi I'm trying to create an array of function pointers contained within a class, the C++11 way. Can I have some help with this as I'm getting a bit mixed up. Here's what I have done so far. They are made up classes to define the problem. #include <iostream> #include …

Member Avatar for Elixir42
0
274
Member Avatar for ProDev7

Hello again. I am stuck with this example: #define Listof(Type) class Type##List \ { \ public: \ Type##List(){} \ private: \ int itsLength; \ }; could anyone explain to me what is the intention and the point in this example? beacause I found this example in a book but not …

Member Avatar for ProDev7
0
141
Member Avatar for SalvatMollet

I'm working on an ATL dll, under C++ VisualStudio 2008. I would include an RichEdit 2.0 Control in an AxDialogImpl dialog. To use RichEdit 2.0 it is needed call AfxInitRichEdit2(). I did it in a non ATL project with no problems, but in the ATL project I have an C3861 …

0
59
Member Avatar for gcardonav

Hello guys: I am certain if I was not trying slef-teaching C++, that this question would have been answer before. What is the use of [inlinecode]using namespace std;[/inlinecode] ? I am not certain, I just know that when I use [inlinecode]#include<iostream>[/inlinecode] I have to appended. Simple question, but a matter …

Member Avatar for StanleyLau
0
4K

The End.