51,593 Topics

Member Avatar for
Member Avatar for Bench

[B]Intro[/B] The focus of this tutorial is the code relating to decision making and selection, and not the I/O code. I [U]do not[/U] advocate using scanf() in this way for anything other than testing blocks of code in 'toy' programs. If you feel the need to use scanf() when writing …

Member Avatar for Dave Sinkula
0
3K
Member Avatar for fesago90

I'm doing a homework for my programming class, the following code is a part of my code which I cut out and formatted to be a 'runnable' program. Now, if you run it you'll notice it creates a data.txt file, writing the amount of student IDs in the record as …

Member Avatar for jwenting
0
140
Member Avatar for Sturm

I use the dev c++ IDE and was wondering if there is anyway in c++ or using system commands to send text packages to another computer that can be received by the other computer to process the information.

Member Avatar for Sturm
0
98
Member Avatar for mouko_yamamoto

Hi all! I'm trying to write a program using the GetCursorPos() and SetCursorPos() functions. When my program isn't sleeping, I want it to set the cursor position to +1 (each axis) of what it is when I call GetCursorPos(). [code]#include <windows.h> int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int …

Member Avatar for ~s.o.s~
0
2K
Member Avatar for shouvik.d

Say if we ve certain private methods along with private data members and public methods. other than friend function is thr any other way we access these members(they being private only) directly. its one of the requirements in a project of mine. The real prob comes when accessing function. say …

Member Avatar for shouvik.d
0
277
Member Avatar for mastern200

I need to create a program where the user selects addition, subtraction, or multiplication, and when they select one, 2 random numbers appear, and they must put in the right answer. The problem is, i cant get the correct answer. It just says: Would you like to play again? [code] …

Member Avatar for rinoa04
0
99
Member Avatar for FC Jamison

I was absent for the discussion and lab due to illness and I am at a total loss as to how to do this assignment. Implement the my_string class in header file my_string.h, so that the test code given below reports SUCCESS. [code] // test_my_string.cpp #include <iostream> #include <string> #include …

Member Avatar for FC Jamison
0
117
Member Avatar for killerdrummer2

Hi, I am trying to use a command setprecision from the <iomanip.h> header. It works well when i declare the number of decimals to display to the right of the decimal point, however i am attempting to have the user input how many places of precision they want. So far …

Member Avatar for murschech
0
189
Member Avatar for fesago90

[CODE=c++]#include <cstdlib> #include <iostream> #include <string> #include <algorithm> using namespace std; int main() { string foo = "123"; if(count_if(foo.begin(), foo.end(), isdigit) == foo.size()) { cout << "\nGreat!\n"; } cin.get() }[/CODE] Does not work on bloodshed v4.9.9.2!!! It outputs the following error: [QUOTE]no matching function for call to `count_if(__gnu_cxx::__normal_iterator<char*, std::basic_string<char, std::char_traits<char>, …

Member Avatar for Ravalon
0
158
Member Avatar for sean25hun

Create a DVD rental shop system using OBJECT ORIENTED programming approach. The system will create a list of ten DVD’s that can be rented from the rental shop. The system is used via the command line. When the shop begins trading a list of available DVD’s will be displayed. The …

Member Avatar for Salem
0
303
Member Avatar for jan1024188

I dont know how to use CopyFile() function in my "program" Can you help me? [CODE]#include <iostream> #include <windows.h> using namespace std; int main() { CopyFile(`C:\\start.exe` `C:\\Program Files\\banana`); system("color 2"); cout<<"POZDRAVLJEN UPORABNIK\n"; cout<<"STRAN WWW.EX-PLANET.COM TE POZDRAVLJA!\n"; system("start www.ex-planet.com"); cout<<"UPAM, DA SE BOS REGSTRIRAL NA NJEJ!\n"; cout<<"OBILO UZITKOV OB PREBIRANJU IN …

Member Avatar for ~s.o.s~
0
2K
Member Avatar for jack19

I have to do a Project in C++I in mid level in C++. Can anybody provide me some guidelines. Thanking You.

Member Avatar for jwenting
0
144
Member Avatar for Woeb

Hello, I'm still very new to C++ and have encountered some trouble in understanding how exactly the copy constructor for a stack class (given as an example in the book I've been learning from) using a linked list works. The interface for the classes: [code=c] template<class T> class Node { …

Member Avatar for Woeb
0
297
Member Avatar for killerdrummer2

Hi, im a new to C++ and i am having an issue with if else if commands. I have the code below, and i am attempting to make it so when prompted "Do you want the correct answers?" you can type yes and it will display the answers, or type …

Member Avatar for John A
0
88
Member Avatar for hiekal85

this question want the calender,with a number of week and days. in germany,the 1st week is started with monday.i have a problem with the year 2000 and the month is in january.when i type it, it shows the 1st week is in 10th.january 2000, it should be on 3rd january …

Member Avatar for Ancient Dragon
0
131
Member Avatar for jan1024188
Member Avatar for elodie

Hi, I'm having a problem with retrieving the text from a combobox. When i do the index of where the text is in the combobox is returned as well as the text. My code is as follows: [code] //default video format dirac_encoder_presets_t preset = VIDEO_FORMAT_CUSTOM; //get the video format selected …

Member Avatar for elodie
0
109
Member Avatar for aaronight

can someone polease help me to me get to develop a voting system on using c++ language. i have being trying to get, but still not reaching. the trueth is am new to the programme and i will be grateful is someone colud take me through. thanks in advance

Member Avatar for John A
0
76
Member Avatar for sam_22

Hi everybody I am a beginner with C++ programming. And I need some help. How can I start with this program *********** [IMG]http://www.gidforums.com/images/gid/smilies/icon_smile.gif[/IMG] The program is using a text file of information as the source of the questions. The program starts by outputting a simple text information screen: Question Master …

Member Avatar for John A
0
216
Member Avatar for flageolet

hi I'm new to C++ and was wondering if it is possible to create variables in runtime. example: If I ask how many patiënts have to be operated, the program should create a variable for each patiënt that can contain their individual data. thx

Member Avatar for flageolet
0
95
Member Avatar for apurv

[B][COLOR=blue]I have been working with C, in TURBO compiler.[/COLOR][/B] [B][COLOR=blue]Now I have started C++, in VC++ compiler.[/COLOR][/B] [B][COLOR=blue]But, now, I m unable to clear screen (clrscr() don't work), can't write at any desired location (gotoxy() don't work)[/COLOR][/B] [B][COLOR=blue]Can anybody plz tell me their equivalents ?[/COLOR][/B]

Member Avatar for andor
0
112
Member Avatar for rbinc

I have to put the following block of code in a loop. It is to display a 10x10 array that will hold char values for a message encrypted in a transposition cipher. I have not been able to figure out a loop or a system of loops that can do …

Member Avatar for WaltP
0
269
Member Avatar for mrik1984

I need help. Can anyone send me a sample code of the porter stemming and the bottom up parsing algorithm using carbide.c++? Here is my email address [I]<< email id snipped >> [/I]I really need help. Thank You. Meyrick

Member Avatar for ~s.o.s~
0
57
Member Avatar for EJCBmore03

Hey guys I'm new to the variables in C++ I use TurboC++ program. If you could, please help me get rid of this one error that keeps popping up... It says "Declaration terminated incorrectly" and when I click on the error it tells me its the "{" at the beginning …

Member Avatar for WaltP
0
178
Member Avatar for flamecly

[COLOR=#000000]Create a class TicTacToe that enables you to write a program to play the game of tic –tac-toe.[/COLOR] [B][COLOR=#000000] [/COLOR][/B] [COLOR=#000000]The class contains as private data a 3-by-3 double array of integers. The constructor should initialise the empty board to all zeros. [/COLOR] [COLOR=#000000] [/COLOR] [COLOR=#000000]Allow two players. Wherever the …

Member Avatar for John A
0
166
Member Avatar for jan1024188
Member Avatar for John A
0
142
Member Avatar for rwagnes

Hey y'all, Could anyone tell me the syntax in C++ of a call to a Delphi DLL? Thanks

0
85
Member Avatar for martial

Hi everyone: Does anyone have an implementation of M/M/1 queuing with C++ Thanks in advance for your help

Member Avatar for Salem
0
42
Member Avatar for gabs

I made an application in vc++ on VS2005, but it doesn't work on non-development PCs. I did the same program on vs 0.6 and it worked very well. but perhaps there is another way to do it, say with a setup or something of the kind?

Member Avatar for jbennet
0
146
Member Avatar for joydsouza90

:?: How do you put a bitmap (or possibly jpeg) image on the screen in Turbo C++ ? I just want to display the picture on the screen for about 15 seconds or so and then move on to another screen. Please Help.

Member Avatar for ~s.o.s~
0
1K
Member Avatar for unclepauly

i am using a couple of methods to calculate the distance between any 2 points on the earths surface. the methods are the law of cosines, and the haversine formula. the law of cosines formula uses the C++ functions acos, sin and cos, all found in math.h: acos(sin(lat1).sin(lat2)+cos(lat1).cos(lat1).cos(long2−long1)) the haversine …

Member Avatar for unclepauly
0
106
Member Avatar for nitinmoriwal

Does anyone know , how to do the conversion from Ascii to long double? Please provide one example. Many Thanks.

Member Avatar for Nick Evan
0
406
Member Avatar for umairsaleem_88

hello!!! i need a tutorial or source code of any graphical programm (animation is preferred) in c++ using borland turbo c compiler v3. i shall be very thank full to any one who help me in this regard. thanks!

Member Avatar for WaltP
0
114
Member Avatar for sivaslieko++

Hi everybody, for example I have such a tree in c++: 23 / \ 1 45 \ / \ 2 31 52 \ \ 3 234 \ 5 I can print this tree in this way by using breadthFirst-level method: 23, 1, 45 2, 31, 52 3, 234 5 But …

Member Avatar for sivaslieko++
0
128
Member Avatar for joydsouza90

How do you put a bitmap (or possibly jpeg) image on the screen in Turbo C++ ? I just want to display the picture on the screen for about 15 seconds or so and then move on to another screen. Please Help.

Member Avatar for Puckdropper
0
85
Member Avatar for Elfshadow

I don't know if this too OT but so many people ask.I just got Sam's C++ in 21 days and it's great.Don't let the name fool you because the book is huge and I don't think I'll finish it in 21 days;). This is the best C++ book I have …

Member Avatar for Colin Mac
0
156
Member Avatar for deostroll

I have designed my own version of cout called gcout that works like cout but in graphics mode. But I don't know the idea behind how to make a caret (or a cursor that blinks). Does this caret thing have to do something with threading in turbo c++? If so …

Member Avatar for apurv
0
143
Member Avatar for murschech

In using "cin" for getting input I have about a 99% success rate. In the remaining 1% of cases the program does not pause for input. What causes this and how does one fix it? In ancient times when we programmed in C rather than C++ the same problem occurred …

Member Avatar for Ravalon
1
160
Member Avatar for jan1024188

ok here I want to know how to make colorated output in C and C++... For example: I want to print this string "zelena". The color must be green. Now how to get green output using [B]printf() [/B]in C and [B]cout << "zelena"; [/B]

Member Avatar for apurv
0
119
Member Avatar for JoBe

Hello ladies and gents, Was wondering if any of you could help me out with the following, sometime ago I had to reinstall MS V++ EE and ever since then, when I enter for instance 'std::' or 'cin.' I don't get a list with all the possibilities it has, normally …

Member Avatar for JoBe
0
123
Member Avatar for Gunner54

Hi, i have made a code. Its meant to announce a "Sentence" but i dont know how to make a string into a sentece. The string up to now only announces the first word of the sentece. [CODE] //Announce }else if(memcmp((void*)lpcLine, "/announce ", 10) == 0){ bRet = false; char …

Member Avatar for WaltP
0
167
Member Avatar for c++34

i'm writing a News class and their subclasses but i have a problem with that function.it tells me that function(virtual string ToFileFormat() ) must convert the news to a string that holds the file format of that news.(File format of each news are given after the class definition)And this function …

Member Avatar for John A
0
145
Member Avatar for jan1024188

hi I am new to C++ and I want to vrite some kind of "virus" for windows. The problem is, I dont want that command line opens when program runs. Its actualy unfinished loop, which beeps all the time. Now i want to know how to make "hidden" program. I …

Member Avatar for jan1024188
0
203
Member Avatar for indulgence

Create a class called Point which can be used to set and get a point (x, y) on a X-Y coordinator. Write a program to let your client set any three points to define a triangle on the X-Y plane and determine:- 1. what type of triangle formed by client’s …

Member Avatar for Bench
0
233
Member Avatar for Sturm

I am writing a small shell script for windows just for fun and was wondering how to open executable programs? Can c++ do this?

Member Avatar for John A
0
118
Member Avatar for sTorM

Hello all , I am just new to programming! I want to store the total number(deck[i].value) of several players evth having loop(players depend on user how many want).I tried many ways for that like vector and array.I dont know why I couldnt!Another thing,if user wants more cards,I want to give …

Member Avatar for Lerner
0
133
Member Avatar for himanjim

Hi Friends, I want to display a bitmap image in my C++ program running on Turbo C++ 3.0 (16 bit compiler)... I'm doing a project on graphic calculator.....My code is nearly complete but I am not able to display a bitmap image......I have got a code [url]http://www.brackeen.com/home/vga/source/djgpp20/bitmap.c.html[/url] But that doesn't …

Member Avatar for himanjim
0
309
Member Avatar for Elfshadow

Should I use the codeblocks IDE with MinGW or Dev C++ IDE with MinGW??? I'm only a beginner C++ programmer and I don't like VC++ express because of installing the platform SDK:eek:

Member Avatar for micdareall
0
108
Member Avatar for Mr.UNOwen

So I started doing c programing and now I want to understand how file systems like fat 32 and NTFS works. So I want to know how to create a file transfering program. So here's a few questions.... 1 How do I do it the portable way? -find file size …

Member Avatar for WaltP
0
129
Member Avatar for sivaslieko++

hi everybody, how can I split my text into the array? for example mytext = "1 2 3 4 5 6"; mytext2 = splitFunction(mytext); then, mytext2[0] = 1; mytext2[1] = 2; mytext2[2] = 3; --- ------ ------------

Member Avatar for sivaslieko++
0
483

The End.