49,755 Topics

Member Avatar for
Member Avatar for Matt Tacular

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 …

Member Avatar for Matt Tacular
0
236
Member Avatar for CurtisBridges

[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 …

Member Avatar for Dani
-1
103
Member Avatar for raydogg57

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 …

Member Avatar for ~s.o.s~
0
136
Member Avatar for tradfreak

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 …

Member Avatar for fesago90
0
106
Member Avatar for FireSBurnsmuP

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? …

Member Avatar for John A
0
176
Member Avatar for amishosh

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

Member Avatar for fesago90
0
121
Member Avatar for megabutt

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 …

Member Avatar for John A
0
97
Member Avatar for loslos

[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++) …

Member Avatar for loslos
1
112
Member Avatar for Harshita_garg

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. …

Member Avatar for Harshita_garg
0
1K
Member Avatar for keeray

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; …

Member Avatar for Dave Sinkula
0
168
Member Avatar for Caped Sam

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 …

Member Avatar for Ancient Dragon
0
283
Member Avatar for Rickenbacker360

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 …

Member Avatar for Rickenbacker360
0
112
Member Avatar for fesago90

[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, …

Member Avatar for Dave Sinkula
0
5K
Member Avatar for kubi

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.

Member Avatar for jwenting
0
82
Member Avatar for RaCheer

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 …

Member Avatar for ~s.o.s~
0
153
Member Avatar for fesago90

;) 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 …

Member Avatar for Ravalon
0
134
Member Avatar for mattyd

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 …

Member Avatar for Infarction
0
181
Member Avatar for adhetola

can anyone help me with the simplest c++ code for solving the sudoku puzzle, without testing for correctness/uniqueness of entries?

Member Avatar for WaltP
0
82
Member Avatar for megabutt

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 …

Member Avatar for megabutt
0
133
Member Avatar for 2nick82

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() { …

Member Avatar for Ravalon
0
110
Member Avatar for Firestone

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 …

Member Avatar for Salem
0
123
Member Avatar for localshredder

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 …

Member Avatar for Madd the Sane
0
15K
Member Avatar for RossSCann

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]

Member Avatar for Salem
0
90
Member Avatar for jan1024188

Whats better? C++ or VB? Im sure C++ is much more powerfoul and portable than VB...what do you think?

Member Avatar for Ravalon
0
301
Member Avatar for micros5

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:

Member Avatar for micros5
0
93
Member Avatar for tech291083

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 …

Member Avatar for tech291083
0
131
Member Avatar for kantze

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 …

Member Avatar for Infarction
0
112
Member Avatar for samernic

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 …

Member Avatar for Nick Evan
0
115
Member Avatar for sree_asrl

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 …

Member Avatar for sree_asrl
0
115
Member Avatar for raydogg57

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 …

Member Avatar for John A
0
236

The End.