49,757 Topics

Member Avatar for
Member Avatar for Kanoisa

Hi guys, As some of you may know im working on learning more c++ and trying to become a good programmer, iv got things like classes, function pointers and template classes under the belt as far as i can see (although to be honest i have never found a place …

Member Avatar for Ketsuekiame
0
193
Member Avatar for Member 784453

I decided to just try and make a program that would identify what KIND of expression you entered, not even evaluate it. Just for it to say: “You entered an addition equation. ” when you enter an equation with a value, a plus sign, then another value … and so …

Member Avatar for Member 784453
0
117
Member Avatar for Jack_1

I am new to C++. i want to write a program that finds factors of a no. and puts them in array and prints it. i have written a program but it is wrong. PLease correct it.Thank you. [CODE]#include<iostream> using namespace std; int main() { int b,c,i; int myarray= [10]; …

Member Avatar for AkashL
0
118
Member Avatar for noobuser

hi can anyone help me with my code, im trying to write a bigInt multiply function but this function got some bugs(it prints additional zero at the left side) input: 3 2 output 06 and ... [code] #include <cstring> #include <iostream> using namespace std; const int mmax = 10000; char …

Member Avatar for noobuser
0
88
Member Avatar for Member 784419

Hello and good evening I'm trying to make a a program that will take text from a input file to a variable in main then use that variable with nested while loops to count all the spaces in the text then display it using cout. I been at this for …

Member Avatar for tesuji
0
112
Member Avatar for c++learner

Hello, I am trying to create a function that accepts an integer and a double and squares both values. I have to pass the values by reference. I am new to c++ and don't understand this and I do not understand functions very much when trying to pass more than …

Member Avatar for NP-complete
0
1K
Member Avatar for sisterjo

I need help trying to write the c++ code on the following algorithm. Can anyone please help! I am totally confused on what to do. // Set TotalTax to 0 // Set TotalGrossEarnings to 0 // Set TotalMedicalLevy to 0 // Set TotalEarnings to 0 // Display Heading // Read …

Member Avatar for Kanoisa
0
186
Member Avatar for rayborn66

I am new to C++ so I am trying to understand why the program behaves differently if you do this [CODE] #include <fstream> #include <iostream> #include <cstdlib> using namespace std; int main() { ifstream fin; ofstream fout; fin.open("getfromthisfile.txt"); if(fin.fail()) { cout << "Input file opening failed.\n"; exit(1); } fout.open("sendtothisfile.txt"); if(fin.fail()) …

Member Avatar for Kanoisa
0
226
Member Avatar for anil1991

i need to submit a car racing in C language using graphic functioins and to derive a track on which i have to run a car in particular time.. in short i have to make a game in C having the phenomenon to beat the clock

Member Avatar for Member 784361
0
104
Member Avatar for empror9

hello guys i have some questions and i want you to help me 1- how to find a factorial for a number e.g. input 5 = 5x4x3x2x1 so the is output 120, now please see my code [CODE]int fac = 0 ; int count = 0; int num; cout <<"Please …

Member Avatar for Agilemind
0
347
Member Avatar for kunkunlol

Ok people, I understand stacks and heaps, but when it comes to recursivity and binary trees, i have a major problem trying to understand this. if someone peopl explain me, how this recur. stuff works, I would be happy! For example, where the value goes, wich function is called and …

Member Avatar for mrnutty
0
150
Member Avatar for siggivara

I'm actually trying to do this in objective c, but I belive the theory probarbly are the same for C++. Heres an example of what I want to do with a simple, working, example using an integer: [CODE=c]void func2(int *i) { *i = 2; } void func1() { int i …

Member Avatar for siggivara
0
187
Member Avatar for YoavX

Hello, i've tried to use Windows sockets not in my LAN and i've noticed that every time my program starts it gets CPU overflowed weirdly [code=c] ProgramConfig myConfig = ExecuteServerConfig("config.ini"); WSAData wData; if(WSAStartup(MAKEWORD(2,2),&wData) == -1)return 0; sockaddr_in serveraddr; int sock = socket(AF_INET,SOCK_STREAM,IPPROTO_TCP); serveraddr.sin_port = htons(myConfig.Port); serveraddr.sin_addr.s_addr = inet_addr(myConfig.Server); serveraddr.sin_family = …

Member Avatar for Aranarth
0
139
Member Avatar for arbme

Hi, I'm new to C/C++ but have worked with PHP for years and want to make a program to tie in with my web applications. I want to write a program that listens on port 80 for incoming HTTP/HTTPS traffic to a web browser. Then checks HTTP headers from a …

Member Avatar for Aranarth
0
105
Member Avatar for BobbieJean

Hi everyone, I think I nearly have this program running right except for printing the adjacency matrix. Here's the code I have: [CODE]#include <iostream> #include <string> #include <memory.h> using namespace std; class Graph { public: static const int MAX_ROWS = 6; static const int MAX_COLS = 6; Graph(); ~Graph() { …

Member Avatar for jonsca
0
261
Member Avatar for Brian Perrigan

#include <iostream> #include <stdio.h> using namespace std ; int main () { char c ; c = cin.get () ; do { cout.put (toupper (c)) ; c = cin.get () ; } while ( !cin.eof () ) ; } How can I make this capitalize only the first letter of …

Member Avatar for jonsca
0
61
Member Avatar for empror9

hello everyone Q1-see this equation [url]http://www.daniweb.com/forums/attachment.php?attachmentid=15688&stc=1&d=1278298959[/url] is this the correct code for this Q1? [code]#include<iostream> using namespace std; int main() { float s=0,p; int i,j; float x; cout<<"x="; cin>>x; for(j=1;j<=6;j++) { p=1; for(i=1;i<=j;i++) p*=x; if(j%2==0) s+=(-p/j); else s+=(p/j); } cout<<"ln("<<x+1<<")="<<s<<endl; system("pause"); return 0; } [/code] *** Q2- i want to …

Member Avatar for NP-complete
0
95
Member Avatar for c++learner

Hello, could someone be so kind as to give me a short tutorial on how to use a function that accepts multiples values and parameters using references. I need to create a function that accepts an int and a double and squares both values by using references. I'm not sure …

Member Avatar for c++learner
0
150
Member Avatar for sarminatorius

Hi, How to explore libraries, by that i mean open and look at its source code? I am using Embarcadero RAD Studio 2010. For example i want to see functions inside #include <list>.

Member Avatar for mrnutty
0
93
Member Avatar for Griff0527

I've searched the C++ forums and cannot find anything that relates to my question. I am writing a program (for class) that opens a txt file and reads doubles from the file, then computes the standard deviation of the numbers in the file. In order to do this, I am …

Member Avatar for Griff0527
0
250
Member Avatar for Dimitar

Hello everyone, I am trying to pre-allocate a certain number of nodes to a linked list, I allocate 10 nodes at first and, if I have more data to store, I'll need to resize it by adding half of the total number of nodes, sort of like 10, second time …

Member Avatar for Dimitar
0
416
Member Avatar for CppBuilder2006

hello I'm writing a program. this program needs to create a few files & use them. where should it create the fils? the program should not create the files in the same folder as itself. because it will be in C:\Program Files where Windows Seven won't allow to create files …

Member Avatar for jonsca
0
99
Member Avatar for deez2183

The recent assignment I was given in my programming class had me utilize a structure. Structures are not covered for another 10 chapters in our textbooks, however I did read up on them as much as I could to try to figure this thing out. I am still unsure on …

Member Avatar for jonsca
0
252
Member Avatar for kaydee123

I want to do a double linked list that has has in each element one operator(+-*/) and one value of type double. I am having trouble in defining the class of the list. Should I use C++ Class Template Specialization or what? [CODE] include<iostream> using namespace std; template <typename T> …

Member Avatar for jonsca
-1
126
Member Avatar for rahuldg13

Hi Guys, My name is Rahul and I own a tech consulting firm in NYC. My office is on 37th between 5th and 6th. I am in constant need for good resources. Most of my clients are direct. Currently I am looking for about 10 C++ developers. Its a 6 …

Member Avatar for jasper#7
0
211
Member Avatar for Rocky111

I am new to C++. I have a problem regarding access specified elements from a text File. I have two File containg the random sorted integert values. and an Array with some size. For exapmle if array contain 10 elements and files will contain random number upto 10 with no …

Member Avatar for Rocky111
0
88
Member Avatar for Wakesta

I have started to follow the Beginner tutorial's so the first one is Hello World, so I have followed what was shown and it has failed this was created in Console application template then added the main.cpp file to the source folder. this is the below error message, can someone …

Member Avatar for Wakesta
0
182
Member Avatar for Silvershaft

Hey, I am making a small network game and I suddenly got some problems with my player class, specially when trying to call the getName function and using the second constructor I get this error: [code] 1>------ Build started: Project: RPG, Configuration: Release Win32 ------ 2>------ Build started: Project: Server, …

Member Avatar for Hektzu
0
210
Member Avatar for onlyvidya

hi frnds m doing project on tracking keyboard,mouse & URL activity. which programming language is much easier to implement this project? Is Java better or VC++ is more better option? plzzzzz suggest me as soon as possible.

Member Avatar for onlyvidya
0
129
Member Avatar for foco

My goal is to have a simple piece of code that will raise an exception if input of non-int is entered. My problem so far, is that I haven't been able to reach the catch block. I have read a little about bad_typeid, but do not know how to implement …

Member Avatar for vijayan121
0
92

The End.