49,755 Topics
![]() | |
First of all, let me exaplain that I only really know python. I thought I would give c++ a try and since then (about two days ago), I have read a few tutorials and have made a guess number game. I thought I would be able to rewrite one of … | |
[B]Exceptions[/B] I am working on a class project as layed out by the instructor. This is in conjunction with Chapter 13 (Exceptions) from the book How To Program in C++ by Deitle 4/e. I am at a total loss on this subject. I thought that catching problems was up to … | |
I need help developing a program that acts as a command line parser. Essentially, my program needs to ask the user to input a command line: eg - A+B=C. It will then output the following: A + B = C. Although this seems basic, my program needs to recognize different … | |
hello :-) I'm Sean and currently a 3rd year BS Business Admin. Major in Management Information Technology student... due to my limited programming skill... i know this would be a simple programming problem to you guys out there so i would like to get inputs on how am I to … | |
Well, I guess I'm just here out of curiosity. I would like to know how one would go about outputting an image file. I thought that maybe you could declare an [inlinecode]ifstream[/inlinecode], and try to read it in, but I don't know how I'd go about that either... Any ideas? … | |
Hi! Even when I use windows versions of C++ compilers (Visual studio or Borland) when I compile my program it opens up in a DOS window. Is VB the only way the program will open up in a windows like window? Thanks, Ami | |
Hey folks, I thought that recently I transitioned form NOOB to novice until I had this question. Oh, well. Why can't I create an executable in Visual Studio 2005? I have my Win32 project code debugged and it builds a library object file, not .exe. I am in release mode … | |
[code]#include <iostream> #include <fstream> #include <cctype> using std::fstream; using namespace std; int count[26]; int main(int argc, char *argv[]) { char ch; ifstream infile("c:\\a.txt") ; if ( !infile ) { cerr << "File could not be opened" << endl; exit( 1 ); } int i; for(i = 0; i <26; i++) … | |
Hi All!! I am relatively new to C++ programming so please forgive me if my question is very basic or silly. I am trying to read files in C++. It opens text based files properly but doesnt open csv files , though I am saving them in the same directory. … | |
i can't run my program bcoz of this error.. [code=cplusplus] #include<iostream> #include<math.h> #include<string.h> #include<iomanip> { int main() int x,y,z,r; float a; char ch; cout<<" enter amount"; cin>>x; cout<<" enter number of years to be paid"; cin>>y; cout<<" enter the rate"<<endl; cin>>z; r= z/100; cout<<" what would you like to compute?"<<endl; … | |
Hi all. I recently downloaded and installed Bloodshed Dev-C++ and have begun going through C++ tutorials and whatnot. I'm very green on the whole C++ thing. My current problem is that I want to use a .cpp file that someone else wrote that includes some so-called 'standard header' files, one … | |
Hello again, I'm slowly getting better, I would never have been able to get this far before, but I'm stuck. Here's what my program is supposed to do: [COLOR=#000000]1. [/COLOR][COLOR=#000000]Develop a C++ program that uses a while structure to input the miles driven and gallons used for each tankful. The … | |
[B]EDIT:[/B] Again, after searching for some time and not finding any answers then asking here and going back to experiment a bit with my code, I figured out the answer just by trial and error :| Hi! My current homework assignment requires me to read some info from a file, … | |
Hey Friends, Can you help me to code a program that sends email in C++? Maybe by Telnet or another way :S i dont know anything about this. Thanks. | |
I have written a program that allows the user to insert scores and the program then provides the average score, the number of scores entered, the amount of each letter grade, and the highest and lowest score. I've also used a sentinal to exit. I'm new to C++ and this … | |
;) Hey guys, I have another simple question today: Lets say I have a structure: [code=c++]struct Info{ string name; string id; double telNum; }; //.... Info person; //....[/code] Now, if I had a function in which I told it to output one of the elements in the structure, how would … | |
Hello: I am interested in understanding recursivity; I have not knowingly used this much in my programming. I am reviewing certain areas of OOP in order to learn more and better about areas that I may not be[I] fully[/I] understood yet. Recursivity is one of these areas. I understand the … | |
can anyone help me with the simplest c++ code for solving the sudoku puzzle, without testing for correctness/uniqueness of entries? | |
Problem background: I am writing a Visual Studio C++ app referencing an Api library provided by a third party. Problem: after calling the API function I am getting a 2059 "syntax error" that I don't understand. I have added the code exactly as the third party documentation has described. Error:c:\documents … | |
How to generate 50 distinct numbers in an array? I have the code for generating 50 numbers but thay are not different. I get same number sometimes twice or three time. Here is my code: [code=c] #include <iostream> #include <cstdlib> #include <ctime> using namespace std; int num; int main() { … | |
I wrote this code to produce a fibonacci seqeunce to a cretain number. However, when you get to a certain number, it starts producing negative numbers, and I don't know what to do. [code] #include <iostream> #include <stdio.h> using namespace std; int main() { long lMax; lMax = 0; long … | |
Does anyone know a good c++ compiler equivalent for MinGW on Mac OSX (10.4x)? I just started a class that requires the use of MinGW, but since it's native windows I obviously can't use it. And just to clear the air, I would rather not install Boot Camp just to … | |
This CreatePen call is failing after repeated calls HDC hDC; hDC=GetDC(hWnd); [COLOR=#008000]apen = CreatePen(PS_SOLID, 1, colorG[7]);[/COLOR] [COLOR=#008000]oldPen=(HPEN)SelectObject(hDC, apen);[/COLOR] [COLOR=#008000]...line drawing stuff...[/COLOR] [COLOR=#008000]ReleaseDC(hWnd, hDC);[/COLOR] [COLOR=#008000]Apparently a memory leak even with the release[/COLOR] [COLOR=#008000]C++.net is the compiler[/COLOR] [COLOR=#008000]Any thoughts?[/COLOR] | |
Whats better? C++ or VB? Im sure C++ is much more powerfoul and portable than VB...what do you think? | |
Is there a way to enter in graphic mode when a process is running in the MS console mode in WXP?. I used to us graphical mode with old borland C, but now in VC++, I can not found the way, I found the SetTextColor, but is not graphical mode.:sad: | |
Hi, I have been a Daniweb memeber for the last 3-4 months. I am now learning C++ on Linux on my own using the tutorials available on this very good site. But I always struggle a bit and sometimes a lot when I am looking for C++ related threads and … | |
Hi there. Pointers confused me till the first day I used them (1 year ago) and still can't understand them 100%. My problem is: I've read from a book that when you have [B]a class with a char* member you must create your own copy constructor[/B],allocate memory dynamically... but this … | |
A container that holds 50 distinct integers has two ends: top and bottom. When an input integer matches one of the integers in the container, it is then moved to the top, and all the integers above the matched integer are moved down to fill the gap in the container … | |
hi, I am new to C++. I need to develop an application in VC++ 6.0 which can send an SMS using SMTP thru SMS gateways. i dont have any clue how to proceed. so pls help me out its very urgent. if possible cau u send me a sample code … | |
Hi all. Eventually my program needs to prompt you to enter a year between 1800-2007 and then it will print off the calendar for that year. In order to do this I must create functions that determine what day of the week Jan 1 was that year, and a function … |
The End.