51,593 Topics

Member Avatar for
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
179
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
124
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
99
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
115
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
171
Member Avatar for rasakse

someone please help me on how to run this coding using knoppix linux.. using c language.. i really need help.. i want to know.. what is the output.. this is the coding :- [code] int main() { Pid_t pid; /* fork another process */ pid=fork(); if (pid<0) { /* error …

Member Avatar for John A
0
131
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
287
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
115
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
85
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
156
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
138
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
186
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
86
Member Avatar for MIGSoft

Hi everybody. In C running in the Unix environment, there are many ways of getting the directory listing. One I know is to use the ftw library (the way I currently implement it), the other is to pipe from the ls, also sometimes you could use dirent.h. I realize that …

Member Avatar for ~s.o.s~
0
151
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
137
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
114
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
135
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
335
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
99
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
132
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
116
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
119
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
116
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
252
Member Avatar for Maidomax

This friend of mine had an idea to make a program witch would be used to manage large numbers of mp3 files, with the ability to change their ID3 tags all at once. This would be usefull if you wanted to divide your mp3 music ino genres etc. Now he …

Member Avatar for Phaelax
0
130
Member Avatar for james_eblin

Hey, i'm new (as you can see i'm a freshman in high school) and wondering how to get started on learning c++. Obviousley their are no classes available to somebody my age so i'm pretty much on my own. Anubody know a good book or somthing on how to start …

Member Avatar for Nick Evan
0
77
Member Avatar for sandeepmuleymca

hi , i got project which already developed in c/c++ as visual studio project so i have to convert it into the java so can u give any information regarding whether any tool is available for conversion or suggest me any way to do this in short time waiting for …

Member Avatar for vegaseat
-1
110
Member Avatar for confussed!

Hi all. I am required to create a application which allows a user to drag images to a icon/ folder. This image file will then be copied. A thumbnail is then created and the thumbnail uploaded to an online Gallery. My first question is whether this is possible to achieve …

Member Avatar for confussed!
0
266
Member Avatar for Rickenbacker360

Hello, this is my first time posting here, so I'm new to the site and C++. First off I'm not asking anyone to do my homework, but I'am having some homework troubles. I've been working at it for awhile and I'm not really sure where to turn next. so any …

Member Avatar for Nick Evan
0
109
Member Avatar for degamer106

>_< I've been searching for nearly an hour and trying to find this memory leak. If you guys could help me find it it would be great. Thx. [CODE]#include <iostream> #include <cstring> #include <crtdbg.h> using std::cout; using std::cin; using std::ios_base; /////////////// user defined data ///////////////////// /////////////// function prototypes //////////////////// class …

Member Avatar for Salem
0
202
Member Avatar for iaaan

Hey everyone, this is my first post. I have viewed these forums alot in the past for C++ help and it has helped me out alot, however I have reached a problem myself. I have been doing C++ since last September and until then i was a complete newbie at …

Member Avatar for iaaan
0
146
Member Avatar for ankit_the_hawk

How can i include graphics in my C program which is compiled in windows compiler like Dev-c++? I was wondering whether it was possible to make the game "SNAKE" in C [B]without[/B] using commands like [INLINECODE]gotoxy[/INLINECODE] But a few moments later I realised that it was practically impossible to make …

Member Avatar for vegaseat
0
124
Member Avatar for Firestone

I'm starting to learn C++, and I wrote this program as a test: [Code=c] #include <iostream> #include <fstream> using namespace std; int main() { char *cString; ifstream File("file.txt"); File >> cString; cout << cString << endl; system("PAUSE"); return 0; } [/code] And when I try to run it it gives …

Member Avatar for John A
0
308
Member Avatar for wait4the1

Hi guys, I have a really puzzling question... I really want to start programming more. (Programming will be more of a hobby than a job for me.) The problem is that I can't figure out which language would be better to learn...C or C++ I want a language that: * …

Member Avatar for Ravalon
0
92
Member Avatar for amirwan

hi, i want to add library to borland c++ it consist of header files and .lib files I try to put the header files in include file and .lib in lib file but they still not working, does that mean the .lib files are corrupted

Member Avatar for amirwan
0
285
Member Avatar for bluecat

Do you know how to save the content of a vector that is in a different form? Do I have to do a dynamic_cast or something like that? The vector has some numbers and I have to save them with a TSaveDialog that is in a different form.

Member Avatar for Lerner
0
85
Member Avatar for bluecat

I'm making a shape editor. When I choose the circle button if I press the mouse button it appears a circle in the form, if I choose the square button it appears a square in the form. But I have to do an MDI Application with this. When I want …

Member Avatar for bluecat
0
148
Member Avatar for GuruGhulab

Hi there, I need to create a program that generates a random number, and asks the user to guess the number and the program tells them higher or lower, and if the program tells them higher, and they enter a number lower, or vice-versa, you call them a moron. For …

Member Avatar for Ancient Dragon
0
127
Member Avatar for ameeroman

hiii every body. well i am a new member . well my problem is that i am a first year students and obvoisly i am studying c++. but i got an assignmet to do. i still not writing the code and i need help as soon as possible . please …

Member Avatar for WaltP
0
345
Member Avatar for SHWOO

I am working on a struct. The two requirements are for the user to be able to input an entry and then view it. I have two questions, when entering the data shouldn't I be able to enter spaces when entering the address i.e. 654 smith st and store that …

Member Avatar for disc
0
110
Member Avatar for tgmtgm1

I need to convert a code having arbitary number of nested loops using tail recursion. can any one provide me its solution in c/c++. For example: [code] for ( int a = 0; a < 3; a++ ) { for ( int b = 0; b < 3; b++ ) …

Member Avatar for VatooVatoo
0
379
Member Avatar for Marks256

As you probably have already read, i am new to c/c++. I have a simple little question, as i am not sure what happens in c/c++. If i were to start using Visual C++ Express 2005, would some of that knowledge work with something that is not visual? I know …

Member Avatar for WaltP
0
146
Member Avatar for Noora

hey everyone.. Im new to this website and I really like it a lot:p I would like to ask you please to help me with the following assignment.. OC Transpo is doing a survey of its service. They have had somebody record the times at which #95 busses pass the …

Member Avatar for John A
0
119
Member Avatar for ankit_the_hawk

I wanted you people's point of view on this project I made in C++ sometime back...I would be glad to recieve comments from anyone and everyone...Pls do check it out...So that I can know the quality of my project

Member Avatar for ankit_the_hawk
0
116
Member Avatar for khoramdin

[COLOR=#000000]Hello everyone,[/COLOR] [COLOR=#000000]I wish to develop an application which can be downloaded from WEB to user's PC (With the KNowledge of the users) and then it creates some soft of interaction with the hardware device of the user's computer. I basically wish to know when the CD/DVD player has been …

Member Avatar for khoramdin
0
123
Member Avatar for edek

Would you be so kind and tell me what does ^ symbol mean in definition of object, example: [code]class ^Object[/code] Thanks in adv

Member Avatar for Ravalon
0
952

The End.