51,593 Topics

Member Avatar for
Member Avatar for Trckst3

Hi guys I'm new here and basically new to programming. Unfortuanetly i'm probably gonna be quite annoying to you just because you guys know what you're doing and I'm like the little slow train that's trying to catch up. Though hopefully you'll help... Here's my situation I'm supposed to write …

Member Avatar for ivailosp
0
100
Member Avatar for sandip250382

Hi, friends this is my first post here. Well, I want to learn C# from home. For this I need all your help.Can any one kindly suggest any easy e-book , I have little concept about OOP's earlier? Thanks in advance. Hoping for a pleasant stay here.

Member Avatar for sandip250382
0
82
Member Avatar for kiwihaha

This program is a simple bejewel game... i need to enter the matrix pos[alpabet][number]...eg(a1 or b7) so if i error input for example: 11 (cout error) this can work aa (cout error) but this will infinite loop... please help me... besides some one can tell me what can i do …

Member Avatar for Ancient Dragon
0
100
Member Avatar for cute121180

Problem statement: The program has to take input for DFA and for h() function that is for homomorphism. I am able to write the program in C++ only for DFA. I am unable to include the h() function. Moreover, my DFA program giving me an error. [code=cplusplus] #include <iostream> #include …

Member Avatar for cute121180
0
191
Member Avatar for Arne Kristoffer

Hello! :) I'm having a problem while comparing one character from a string with a ... string. This is a part of a pretty complex loop (or, it's complex for me, since I'm new to C++ and programming), but the case is that I need to compare the value of …

Member Avatar for Arne Kristoffer
0
22K
Member Avatar for ulrik04

I've made this Supaplex-like game, but I have a problem. I want to have more levels, so I've made that when moving to the next level, it clears the vectors with all the objects, and putting new objects into. this is my code for moving to level 2: [code] void …

Member Avatar for ulrik04
0
111
Member Avatar for Rotvailera

Hello. First sorry for bad english. Can somebody help me with this: Using Bisection method find one real root for f(x)=x^9-x^7+2x^2-1 xE [0;1] I have to write a program in c++ witch founds me the root. Please help me. Again sorry for the bad english

Member Avatar for Rotvailera
0
104
Member Avatar for nurulshidanoni

[B]exam TStu TExam [/B] 1 91 25 2 168 20 3 2080 46 4 680 56 5 15 12 6 680 22 7 166 20 How to sort in descending order like this.. 4 680 56 3 2080 46 1 91 25 ....................................

Member Avatar for Ancient Dragon
0
113
Member Avatar for xsoniccrackersx

Hi all, I'm new here but I am in need of some desperate help. I have a program that works perfectly but here is the problem: I cannot use the function getline to get a line in the input file and turn it into a string to be manipulated by …

Member Avatar for xsoniccrackersx
0
1K
Member Avatar for Kaushalya

Wish you all a good day.Currently i'm working on c++ project.I want to know how to convert string object to a character array.Also why ifstream object doesn't accept a string variable as follows, void split(String filename) { ifstream ifile; ifile.open(filename);//this fails }

Member Avatar for VernonDozier
0
103
Member Avatar for obsolucity

I am having trouble with this assignment and was hoping I could get some help. I am not sure whether or not the output for my decomposed, unsorted, and sorted lists are correct. I'm not sure how to interpret the data in order to help justify why the big-o estimate …

Member Avatar for Laiq Ahmed
0
320
Member Avatar for nedimavci
Member Avatar for lizhiyuan

dear all any one know howt to use openGL with vc++? i encountered some problem.thanks a lot. why glRectf(x1,y1,x2,y2) can draw a rectangle, here (x1,y1),(x2,y2),just two points,anone can exsplain to me? thanks. sorry to ask such question.no choice!

Member Avatar for Nick Evan
0
147
Member Avatar for TSharma

please send me some examoles of implementing str stream. i am trying to understand it but i could not find proper source in the net. what does str() do??

Member Avatar for Laiq Ahmed
0
92
Member Avatar for mod_motox

Hi In my program one of my function returns a vector<int> ... I want to save it in to a vector<string>. itoa function does not seem to work here. Is there anything that can be done regarding this. Thanks in Advance.

Member Avatar for iamthwee
0
246
Member Avatar for yonex

#include <string> #include <map> #include <iostream> using namespace std; struct arrtibute { const char* name; int id; }; typedef std::map <std::string, arrtibute*> AtrributMap; AtrributMap atrributeMap_g; const int MaxCount = 3; void InitData() { for (int i = 0; i < MaxCount; i++) { static arrtibute atrr; std::string str; cout < …

Member Avatar for Laiq Ahmed
0
137
Member Avatar for WonderWomen204

hey there. This is Erinn Hansen and I have a quick question about this assignment I am working on. I pretty much have it, except for it's a little backwards. This assignment is: Write a program which accepts the following user input: priceOfHouse, numMonths Print an amortization chart as shown …

Member Avatar for WonderWomen204
0
174
Member Avatar for fluidDelusions

Hello! I'm having a very difficult time with this problem. What I'm trying to do is generate a sine wave for a specific frequency and output it as raw pcm data to a file. The sine wave is generated as follows: [code] samples[i]=static_cast<int>(32767 * amplitude * sin(static_cast<double>(i)*scale) ); [/code] where …

Member Avatar for ims
0
1K
Member Avatar for christiangirl

I'm getting this error: term does not evaluate to a function taking 1 arguments on the bolded and underlined parts of this code. I know this code isnt that great...has some extra stuff it doesnt need, but I'm working on that. This is pretty much the first program I've made …

Member Avatar for christiangirl
0
119
Member Avatar for Race

I new to programming and am having troubles writing C++ programs and would really appreciate help with the following question. Write a C++ program that reads from keyboard 3 words, with proper input prompt. Then for these 3 words that were read, the program displays first the word longest length, …

Member Avatar for Race
0
76
Member Avatar for Megaz221

Hi, I'm back again. Anyways, I have been working on a little project on my own. But I have a question about something. How would jumble characters in a string around. Let's say user inputs a word computer , the program then jumbles the characters in the string to mpcotreu. …

Member Avatar for VernonDozier
0
280
Member Avatar for iiz

this is the python code [CODE]os.popen("explorer.exe " + os.getcwd())[/CODE] would jsut need a conversion to c or c++

Member Avatar for iiz
0
98
Member Avatar for GPXtC02

i'm looking to get a first name followed by four scores and finally a last name, stored into multiple arrays (a char *array, a float array, & a char *array). getting the scores i understand however the names are pointer arrays. as far that goes what am i doing wrong …

Member Avatar for vmanes
0
495
Member Avatar for leverin4

Ok, I have a program that uses three classes and a driver program, all compiled separately. One class is a Date class. The Date class header looks like this: [code=c++]#ifndef DATE_H #define DATE_H #include <iostream> using namespace std; class Date { public: // initializers Date(); Date(int day, int month, int …

Member Avatar for Lerner
0
130
Member Avatar for an00b

I'm using windows xp sp2 so I would like to know how to do it with winpcap, an example source will be helpful, thanks.

Member Avatar for dougy83
0
48
Member Avatar for pship07

I need to make a program to do the following: 1. ask the user for the name of the input file, and open/read it. 2. For each well-formed cout statement, i must execute it. For any malfunctioned cout statement, print an error message. the syntax of a well-formed cout statement …

Member Avatar for VernonDozier
0
106
Member Avatar for demroth

I am working on sorting strings of integers with a radix sort. I am confusing myself on the code logic however. I have a file with integers, one to a line, and padded so 1 would be 001. I want to read those integers as strings so I can later …

Member Avatar for demroth
0
154
Member Avatar for daviddoria

I found _isnan() in float.h for VS2008, but I would like to SET a variable to a NaN intentionally, not check if it is one. Is this possible? Thanks, David

Member Avatar for daviddoria
0
291
Member Avatar for GPXtC02

is there a built in function to deal with numbers similar to how the swap member function (first.swap(second);) deals with strings? thanks

Member Avatar for GPXtC02
0
263
Member Avatar for Ryano24

I am having some trouble getting this code into C++...Can somebody help me! [code] [inlinecode=cpp] #include <iostream> #include <cstdlib> #include <ctime> using namespace std; int random_1(); int main() { int i = 0; int j = 0; int check; int check_1; char play_again = '\n' ; int tortoise[70]; int hare[70]; …

Member Avatar for Majestics
0
100
Member Avatar for yarita

can anyone help me fix this??? I have to do all of this in functions, but i keep getting somethings wrong. Thanks! Sample Run (The user’s entry is in bold) Enter the Students Id:[B]5656[/B] Enter how many courses-up to 3: [B]6[/B] Invalid number! Try again Enter how many courses-up to …

Member Avatar for Majestics
0
118
Member Avatar for tootypegs

hi, im having trouble when outputing the data from my program. i am trying to output numerous amounts of data into 1 txt file when running through a loop, but everytime it writes to my file it overwrites the previous data stored with in it. Can anyone offer some advice …

Member Avatar for tootypegs
0
116
Member Avatar for TylerTCF

Is it legal to have a vector of struct to be returned as the output of a user-defined function? I can't seem to get it to work? Thanks.

Member Avatar for bugmenot
0
77
Member Avatar for legendarya49

[code]#include <iostream> #include <time.h> #include <fstream> #define MAXSIZE 1000 #include <cstring> #include <string> using namespace std; class Students { public: string firstName; string lastName; string social; double gpa; Students() { firstName = "Adam"; lastName = "Wilson"; social = "000-00-0000"; gpa = 0.00; } Students(string newSocial, string newFirst, string newLast, double …

Member Avatar for legendarya49
0
144
Member Avatar for idle09

Hi! When I compile my program, I am getting an error message which says "fatal error C1010: unexpected end of file while looking for precompiled header directive" How can I solve this problem? By the way I am using microsoft visual C++ 6.0

Member Avatar for vmanes
0
33
Member Avatar for munawwar firoz

Hi all! Iam new to win32 programming.I use Dev-C++,I know how to create buttons using the CreateWindowEx function.But dont know how to display icons or bitmaps on buttons nor on static windows [B]during run time[/B].All i know is that the BUTTON class supports BS_BITMAP and BS_ICON dwStyle. and i dont …

0
49
Member Avatar for jmines

I am new to streams and files in C++. I am having a problem in this code. When i run the program, and after entering the password, a message is displayed "error opening infile". Why the program is not reading from the file or opening it? [CODE]#include<iostream> #include<string> #include<fstream> #include<iomanip> …

Member Avatar for jmines
0
101
Member Avatar for vaid.abhishek

Okay, guys, after running a thread bout tht nth_element problem [ which is still not solved ] I again have a problem. The code I give below [ I have also attached the file ], is simply a MergeSort procedure. It works wonderfully well. I have enabled validation of it …

Member Avatar for vaid.abhishek
0
140
Member Avatar for wubeikk

Assignment #1 First Class – extended version 1. Extend the class myTime from the previous assignment so it includes methods of all types (excluding operators) discussed during the lecture. The constructors and the destructor should print out a notifying message on the screen. 2. Write a function with the copyMe …

Member Avatar for wubeikk
0
184
Member Avatar for rem0404

so i'm trying to fix my "load" function, but i can't seem to get it to work correctly. here's the load function i have currently: [CODE]void load(string messages[], int keys[], int& numElements) { int index = 0; int key; string message; while(index < MAX_SIZE && key > 0) { cout …

Member Avatar for rem0404
0
162
Member Avatar for ulrik04

Hello :) I'm making a very simple game in C++ (very much like the old DOS game Supaplex if anybody know that :P). I'm using the windows API, not GDI, DirectX or anything like that. I've only just begun learning the Win Api some days ago :) I have the …

Member Avatar for ulrik04
0
77
Member Avatar for ecorg

Hello, I am fairly new to c++ and I am wanting to find out some information about creating a calculator that can calculate a noisy input stream e.g. 1hgj6-fgkj7 = 14 (1+6+7) 3ku5jf3 = 11 (3+5+3) I have looked into some tutorials when creating a calculator in C++, although none …

Member Avatar for Salem
0
83
Member Avatar for varsha0702

Hi.. I have written a C++ program to compress and decompress jp2k files. But when I am executing this program the CPU usage is 100%... Can any one tell me : why is it so and how to reduce CPU usage? I have compiled same code on windows and Linux …

Member Avatar for Salem
0
187
Member Avatar for rukshenaa

implementing dijkstra algorithhm using fibonacci heap.................. can anybody help me with the coding for the above problem................. i have implemented using array.... now i hav to implement it using fibonacci heap.........

Member Avatar for Salem
0
185
Member Avatar for Troula

This is a code i made, for checking if a nickname and password exists.. I have two question about this code... 1) In line 38 i close "fuser", but if i try to use this again there is an error. So, i used "fpass". Is there any way to use …

Member Avatar for Narue
0
111
Member Avatar for ronicasingh

Hello, This may sound like crazy question, but need some certainty. In a normal i/o console, is it possible to draw or have lines along with inputting text. Ronica

Member Avatar for Narue
0
68
Member Avatar for oneguy

than the java version in this case [url]http://razi2.blogspot.com/2008/04/why-is-c-slower-than-java.html[/url]

Member Avatar for Narue
0
62
Member Avatar for khaldoon_pucit

Hi there, i want to build an telephonic application, for which i need a TAPI(Telephonic application programming interface) component, i search it a lot but i conldn't find it.if someone can help!

0
65
Member Avatar for Traicey

Im a Novice in C++ and Im writting test in few weeks time... have got this question paper and there is something about pow function... when I asked my instructor about it, he just gave me his usually glance and say I must figure it out....well now back to my …

Member Avatar for Traicey
-1
137
Member Avatar for rzr.copperhead

hi all guru, here, my problem is re-running the program, the vector attribute of Service Class was listed unreadable characters.. WHY?? Below is my following code : Service.h code: [code] class Service{ protected: char servType[100]; vector<Medicine> vecMedicine; // the purpose that i created a vector attribute is a service can …

Member Avatar for Ancient Dragon
0
202

The End.