49,761 Topics

Member Avatar for
Member Avatar for Kennych

~I need to do the following ~ Take Input from number assign it to variable maxNumber ~ Create variable called randomN and assign a random number from 0-maxNumber to randomN -C++ Please need help thank you.

Member Avatar for Ancient Dragon
0
59
Member Avatar for SpyrosMet

Can anyone please tell me how to create a simple window? If possible can you provide an example? Thank you.

Member Avatar for Ancient Dragon
0
100
Member Avatar for weaslem32

I need help with an assignment. I have to modify the program below to determine the number that was entered the most times in a row and display the output. I can not use files or arrays. I am having trouble with the logic and need some guidance. Thanks. [CODE]#include …

Member Avatar for dusktreader
0
73
Member Avatar for scott6480

I am having trouble with myRectangle2 taking the values I am assigning to it. The myLine2 value works just fine. Can anyone spot what I am doing wrong? I have stared at this for too long and now I am second guessing everything I have already done. Any help is …

Member Avatar for WaltP
0
128
Member Avatar for BobbieJean

Hello, I'm new here but I need a little help please. I've gotten this program to mostly work correctly except for what seems like one small detail. My program is supposed to ask the user to enter a file name, open it and display its contents 24 lines at a …

Member Avatar for WaltP
0
662
Member Avatar for SpyrosMet

I was wondering if [CODE] *pntr.age = 19;[/CODE] is valid considering that pntr is a pointer to an object that has age as a varible. If it is valid, can it be used with an array of pointers to objects? if yes can i get an example please? thank you.

Member Avatar for mrnutty
0
100
Member Avatar for Mono15591

I haven't ran it for a while now and now I need to register it BUT the link it has to register doesn't load anymore...the site loads but all I get is a stupid loading animation for the product key. it's been going for 20 minutes now. I've tried multiple …

Member Avatar for totalwar235
0
82
Member Avatar for lsandling

I guess I am really having trouble with what's inside the function How do I get it out.. Suppose I ask a yes or no question and if the answer is no then break if the answer is yes then compute that formula. okay [CODE] int ThingYesNo; doubleThingHeight do { …

Member Avatar for lsandling
0
114
Member Avatar for ahaykal

Hello i am new here i liked this community: I have a c++ homework could you check it if it is correct? 1. Rewrite the following loop so it uses pointer notation (with the indirection operator) instead of the subscript notation: [code] for (int x = 0; x < 100; …

Member Avatar for nezachem
1
479
Member Avatar for philipbas

i don know about class n pointers,can u explain it with essy examples please

Member Avatar for dusktreader
-2
80
Member Avatar for fenerista

I have GradeBook.h that include class interface, GradeBook.cpp that include class implemantation, I want to make a lib file and use it with GradeBook.h on the other project. How can I do that ? I am using Windows 7, VS 2008

Member Avatar for fenerista
0
260
Member Avatar for SamStradling

I am getting the error error C4716: 'ReStart' : must return a value can anyone help? thanks [code]int ReStart(int id);[/code] [code]PushButtonAdd("Transparent",90,300,ReStart,11);[/code]

Member Avatar for harryhaaren
0
164
Member Avatar for mikabark

When I want to save result to file I use ofstream, right? [CODE]ofstream myout; myout.open (sav_fl, fstream::app); [/CODE] But depending on the "ol" value(=user input), I want to show it to screen not to file. How can I do? I thought this way. But error message shown up. [CODE]if (ol …

Member Avatar for mrnutty
0
85
Member Avatar for SpyrosMet

Hello. I need some help with a project of mine and the thing is that I have the class organisms that has two sub-classes: animals and plants. Animals has two subclasses itself: Carnivores and Herbivores. I have succeded in including the plants header file or cornivores header file or herbivores …

Member Avatar for SpyrosMet
0
116
Member Avatar for deorcar

hi im working with opengl/sdl and im still new to it what im trying to do is to make a 2nd box or sprite that will follow the frist box ive made can anyone help me out here is some of the code i have [CODE]#include "sdl.h" #include "GL_Functions.h" #include …

Member Avatar for Skeen
0
126
Member Avatar for atticusr5

Hey everyone, I have this assignment for my C++ class and I need to sort some data I have data in a file in this order: some 10 digit int -the account id some name -the account name some balance -the account balance basically I want to sort the data …

Member Avatar for atticusr5
0
106
Member Avatar for Roger_Hades

Hi everyone! I've been working on this code for 2 days(got half of it from the web) [code] class name { string name1; public: name(string s) //set name { name1 = s; } string get() //get name { return name1; } }; // Define less than relative to name objects. …

Member Avatar for Roger_Hades
0
159
Member Avatar for Szabi Zsoldos

Hey, this is my first post here, glad to be here and learn from you guys! what i'm trying to do is this: I would like to enter 2 names and then hit a number from lets say 1 to 10, and i have the array Q1,Q2... etc. these should …

Member Avatar for jonsca
1
372
Member Avatar for VilePlecenta

upon trying to save or view the code when I generate a dialog box in vs 2010 beta 2 I get a nice [URL="http://yfrog.com/jmdialogerrorp"]Little Error Box[/URL] That pop ups and prevents me from saving or editing the source at all leaving hours wasted making it in the first place. I …

0
54
Member Avatar for V0ldemort

[CODE]LPCWSTR name; name += TEXT(".png");[/CODE] produces:'+=' : illegal, right operand has type 'const wchar_t [5]' I want to have .png appended to the name string. Anyone know how to fix it?

Member Avatar for thelamb
0
59
Member Avatar for xiaodi
Member Avatar for WaltP
-1
41
Member Avatar for kppowell

Hey, im Keith and im 15 years old. I like computers alot and im pretty good at making websites, so this year i signed up for computer science. Our teacher is teaching us how to wrote programs using C++ and i love it, but i was wondering, why are they …

Member Avatar for sonu babu
0
276
Member Avatar for nose

I am trying to convert this to Delphi, but I'm lost, please help [CODE=cpp]enum Error { Ok = 0, ErrorUnsupportedFunction, ErrorInvalidParamaters, ErrorInternal, ErrorUnknown = 0xffffffff }; typedef enum Error Error; Error __stdcall GetLastError() { typedef Error(__stdcall *FunctionType)(); FunctionType GetLastError = (FunctionType)GetProcAddress(GetModuleHandle(NULL), "GetLastError"); return GetLastError(); }[/CODE]

0
57
Member Avatar for manchesterutd

Hey guys, I really do not know on how to start this loop logic structure. Can anyone give me a rough idea on how to go about it? The question is : Develop a solution to calculate a student's grade average for one semester. The letter grades should be entered …

Member Avatar for WaltP
0
74
Member Avatar for Dragonsreign

[code] /* * This program displays "I Love C++" to the Standard Output */ #include <iostream> int main () { std::cout << "I Love C++"; return 0; } [/code] I just DLed and Installed Cygwin and Netbeans using instructions from: [url]http://netbeans.org/community/releases/65/cpp-setup-instructions.html[/url] I did see that ths "type" of problem has …

Member Avatar for Dragonsreign
0
923
Member Avatar for d2dupes

So here is my program: [code] #include <iostream> #include <string> #include <iomanip> using namespace std; int main() { string lotName, bidder1_ID, bidder2_ID; double reservePrice, bidder1_bid, bidder2_bid; cout << "Enter lot name: "; getline (cin, lotName); cout << "Enter a reserve price: cin >> reservePrice; cout << "Bidder #1, enter your …

Member Avatar for VernonDozier
0
77
Member Avatar for clutchkiller

Assuming that a year has 365 days, write a class named DayOfYear that takes an integer representing a day of the year and translates it to a string consisting of the month followed by day of the month. For example, Day 2 would be January 2 Day 32 would be …

Member Avatar for clutchkiller
0
304
Member Avatar for agnetta22

this is the program // file: am00201.cpp // author: a.montes de oca #include <iostream> using namespace std; int main() { int a[16] = {67, 111, 110, 103, 114, 97, 116, 117, 108, 97, 116, 105, 111, 110, 115, 33}; int i; char letter; i = 0; while (i < 16) …

Member Avatar for adnan.siddique
-1
124
Member Avatar for psdao1102

[CODE]#include <fstream> #include <iostream> #include <cassert> using namespace std; int main() { ifstream inFile; ofstream outFile; inFile.open("file.txt"); assert(!inFile.fail()); cout << "everythings fine" << endl; cin.ignore(); cin.get(); return 0; }[/CODE] This is my current code, file.txt doesnt exist. The program simply crashes. I was hoping for an error message explaining what …

Member Avatar for Ancient Dragon
0
115
Member Avatar for chuong3a

Help me to find the error in Prim code, thanks. [CODE] #include <iostream.h> #include <stdio.h> #define MAX 10 class prims { private: int cost[MAX][MAX], tree[MAX][MAX]; int n; public: void readmatrix(); int spanningtree (int src); void display (int cost); }; void prims :: readmatrix() { int i, j, k; n = …

Member Avatar for chuong3a
-1
95

The End.