49,757 Topics

Member Avatar for
Member Avatar for James19142

i made a header file with my function declarations and the cpp file with the definitions. While making the definitions in the .cpp file i included the header and from the highlighted text the definitions seemed to match declarations in the header. In the header the the declarations were able …

Member Avatar for James19142
0
857
Member Avatar for thenewbiecoder

[url]https://docs.google.com/viewer?a=v&pid=explorer&chrome=true&srcid=0B3GcG6SeWKK_YzE1NDNmY2MtNTY0Ny00NTVhLTg1M2EtNDc5YzRmOGEzMjA0&hl=en_US[/url] I am completely stuck on this assignment I'm not sure what I should be getting. Can anybody take a look at my code and please help me. I need to complete this assignment asap. thanks Direction: Design, implement, and test a class that represents a phone number. The number …

Member Avatar for vijayan121
0
217
Member Avatar for twicepipes

I know how to use the compare functions to check if a string is exactly the same as another but I wasn't sure if there is an easy way to go about checking if a string contains any sequence of A through F. Can I add up the memory values …

Member Avatar for vijayan121
0
261
Member Avatar for altXerror

ok. so i'm having trouble with the Windows API. i'm just learing how to use it, so i don't know much about it. anyways, i just wanted to create a window and have it displayed then catch the exit message and close, but VC Compiler is throwing errors. 1>c:\users\furrix\documents\visual studio …

Member Avatar for altXerror
0
332
Member Avatar for literal
Member Avatar for shmamy

Okay so someone may have already posted something like this but my assignment is due in like 4 hours and don't have time. So here is the problem and my code. My problem that I am having is that it only works for single words. Not whole sentences. I need …

Member Avatar for shmamy
0
734
Member Avatar for Labdabeta

Is there a way to make a class visible only from within another class. i.e: [CODE]class myclass { private: class anotherclass { //stuff that only can be used from within a myclass function void dosomething(); float dosomethingelse(); }*anotherclasses; int numanotherclasses; public: int createanotherclass();//creates anotherclass object, puts it in the array …

Member Avatar for mike_2000_17
0
231
Member Avatar for monkeybut

I have a quick question, I have to read in data from a file that has names and grades in it, I must take the names and store them in a string array and the grades and store them in a 2-d array. Any pointers on how to determine what …

Member Avatar for monkeybut
0
98
Member Avatar for Braindead90

I am working on creating a linked list to connect the previous value number (or string) to another value I asked this question before I am just guessing I did it completely wrong since no one responded. So what would be the best way to start the function. I need …

Member Avatar for sfuo
0
255
Member Avatar for PapaGeek

I have a program that relies on file timestamps that works fine in XP but fails in Windows 7. I ran the following test in Windows 7: Create go.bat to look at all 3 file timestamps: [CODE]@echo off dir /tc test* | find "test" dir /tw test* | find "test" …

Member Avatar for PapaGeek
0
158
Member Avatar for HungMob

Hello again! I was given an assignment the other day in C++ and I was suppose to use the counter and add a sentinel so the program knew when to stop. Instructors directions: "The file for this assignment reads a sequence of positive integers from a file (2 3 5 …

Member Avatar for HungMob
0
189
Member Avatar for Panathinaikos22

C/C++ have Datagridview-Listview-Calend and all those controls? i think c/c++ have only simple controls like msgbox/textbox/&button i have spend lot of hours to find something for win32 but nothing... exist smthing or i must draw byself :-s thats crazy...

Member Avatar for Moschops
0
129
Member Avatar for Süspeñce

[CODE]//I make program of infix to post fix xpression plz tell me waht wrong with my code //some it true result for arthematic opertaors b,w two oprend but with more then it does //not provide valid output plxxxxxxxxxxxx help me #include<iostream.h> #include<conio.h> #include<stdlib.h> #include<string.h> int presidence( ); void infixToPostfix(char *); …

Member Avatar for Süspeñce
0
378
Member Avatar for _dragonwolf_

Ok, I have been trying to work this thing for a week. It is a program that is supposed to read from 2 files (.dat) and write to a third file (.dat) then update one of the first files. i.e. read oldmast.dat read trans.dat compare data write data and changes …

Member Avatar for vijayan121
0
223
Member Avatar for hao001

[CODE]#include<iostream> #include<cmath> using namespace std; void getChoice(int& choice); void getInput1(double& foot, double& inche); void getInput2(double& meter, double& cm); void convert1(double foot, double inche, double& meter, double& cm); void convert2(double& foot, double& inche, double meter, double cm); void showResult1(double foot, double inche, double meter, double cm); void showResult2(double foot, double inche, …

Member Avatar for hao001
0
2K
Member Avatar for Isaac1024

C++Syntax[CODE]#include "stdafx.h" #include<iostream> #include<cstdlib> #include<ctime> using namespace std; int main() { srand(time(0)); int arr[10]={0}; for(int i=0;i<10;i++) { arr[i]=rand()%50+1;} for(int i=0;i<10;i++){ cout<<arr[i]<<endl; } return 0; }[/CODE] I want to use the * to display the output, what I should improve?

Member Avatar for Fbody
0
86
Member Avatar for gchaim

Hello I need to create a graphic simulator for MIPS CPU, something that will show the structure of the CPU, and when getting a text file with MIPS code- it will show how does each command executed through all the CPU parts. However, i have never worked with grpahics, i …

0
46
Member Avatar for ksm092

Hi, I have two classes in two separate .cpp files. I obtain a string using cin and then I need to use this string in a method in a separate class. If that makes sense.. [CODE]class HomePage{ static void HsubmitChangeDutyRequests(string) { Duties::submitChangeDutyRequests(string);} }[/CODE] [CODE]class Duties{ static void submitChangeDutyRequests(string); }[/CODE] This …

Member Avatar for vijayan121
0
324
Member Avatar for WolfShield

C++ was once the King of programming. It would crush any competitor! But, now it seems that C++ is getting less popular. New programmers are rushing to easier to learn, higher level, programming languages (e.g. Java). And with Microsoft coming out with C# which is gaining popularity (even though it …

Member Avatar for Netcode
0
1K
Member Avatar for maybnxtseasn

Because references always “point” to valid objects, and can never be pointed to deallocated memory, references are safer to use than pointers. Can anyone give an example of this? this doesnt make sense. couldn't you just do [CODE]int& function() { int variable = 3; return variable&; }[/CODE] looks deallocated to …

Member Avatar for vijayan121
0
101
Member Avatar for Seiko09

Hi, im new here, and i want to ask about "how to make a compiler". I'm a Computer Science and part of my subject wants me to create a compiler, and I had no idea of how to create one. Can anyone help me.....

Member Avatar for vijayan121
1
237
Member Avatar for sergent

It seems like when invoking a function explicitly, it should be compiled at compile-time with a specific variable type, but I am not sure how implicit function invokation works. I don`t think compiler will create a different function for evey datatype available (since there can be many different data-types in …

Member Avatar for stereomatching
0
177
Member Avatar for myrongainz

Hello, basically I'm trying to write a program where you ask the user to input 2 positive number. Then the program will print the lower of the two numbers to the higher of the 2 numbers and then higher of the 2 numbers to the lower of the 2 numbers. …

Member Avatar for sundip
0
416
Member Avatar for kazewafuiteiru

I have to do a 4 function calculator for class with the do...while loop. With the option of ending the program after the while by either entering 'y' or 'n'. However the program automatically loops without seeking input to restart or not. [CODE]/* This is a four function calculator with …

Member Avatar for WaltP
0
170
Member Avatar for Raim

So I'm making a simple calculator program on the Windows Form Application of C++. Nevertheless, I'm stuck on the exponents, factorial, and square root part. In my System32 Console calculator, these were the codes I use for the exponent, factorial, and respectively, while I just used the sqrt function of …

Member Avatar for Raim
0
403
Member Avatar for myrongainz

Hello, basically I'm trying to write a program where you ask the user to input 2 positive number. Then the program will print the lower of the two numbers to the higher of the 2 numbers and then higher of the 2 numbers to the lower of the 2 numbers. …

Member Avatar for sfuo
0
2K
Member Avatar for bwill31

I'm currently getting a fatal error LNK1120: 1 resolved externals. Can somebody help me figure out what is going on? #include <iostream> #include <iomanip> #include <fstream> using namespace std; const int MAXCHAR = 101; const int CAP = 100; struct Cart { char itemName[MAXCHAR]; char itemPrice[MAXCHAR]; char itemTotal[MAXCHAR]; }; void …

Member Avatar for bwill31
0
459
Member Avatar for Limiter

Hi, I recently started learning C++ and have decided to install it onto my computer to try writing some codes. So I chose Code Block as my IDE since it is free. I know, since I use Windows 7, you will probably recommend Visual C++. But I want to stick …

Member Avatar for sergent
0
216
Member Avatar for Tom_Weston

Alright, so what I would like to see happen is two strings attached. I know I can cout << them both and they will output an attached string, but what if i want to call the attached string in another area of my code? [CODE] #include <iostream> #include <string> using …

Member Avatar for Tom_Weston
0
134
Member Avatar for AlvinLiu

[CODE]#include "assign3.h" #include <iostream> using namespace std; Calculator::Calculator(int size) { if (size > 0) { mSize = size; mPstack = mPtop; if ((*mPstack).im && (*mPstack).re) { mSize = size; mPstack = mPtop; } else { mSize = 0; (*mPstack).re = 0; (*mPstack).im = 0; } } else { mSize = …

Member Avatar for AlvinLiu
0
182

The End.