49,761 Topics

Member Avatar for
Member Avatar for NYCrealist

[CODE]int main () I have this question how would find the headers for the five functions that are below without supplying the blocks for them, i dont quite understand it { int x, c; double r; x = readData (); for (c = 0; c < 5; c++) printValues (x, …

Member Avatar for rubberman
0
99
Member Avatar for garber

[CODE]#include <iostream> #include <string> using namespace std; int main() { // Variable declarations allowing us to calculate string fullName; int weeklySalary; int weeks; string age; int option; int actualage; int earnings; double savingsPercentage; double percentage; int retirementage; double total; cout << "What is your name? "; getline(cin, fullName); cout << …

Member Avatar for rubberman
0
137
Member Avatar for ritu143

Hi, I am new to c++, facing difficulty in compiling the following code [CODE]#include <iostream> #include<string.h> using namespace std; class myclass { public: int i, j, k, *l; // accessible to entire program static int *m; }; int myclass::*m = NULL; int main() { myclass a, b, *p; a.i = …

Member Avatar for rubberman
0
2K
Member Avatar for maxstoto

please guide me....i didnt know how to implement its... my situation is like this :- let say that i have 11111010..... And i want to move the left most side of binary number and add with the 4 bits in the right side, so its can be like this . …

Member Avatar for rubberman
0
147
Member Avatar for g_u_e_s_t
Member Avatar for rubberman
-1
480
Member Avatar for Blackiey

#include<iostream> #include<stdio.h> #include<string> #include<stdlib.h> #include<time.h> using namespace std; void printBoard(); void fillBoard(); void checkWin(); string board [9][9]; bool gameOver = false; int main() { fillBoard(); printBoard(); }//end of main void printBoard() { cout<<board[0][0]<<" | "<<board[0][1]<<" | "<<board[0][2]<<" "<<board[0][3]<<" | "<<board[0][4]<<" | "<<board[0][5]<<" "<<board[0][6]<<"| "<<board[0][7]<<" | "<<board[0][8]<<endl<<"--------- --------- ---------\n";//1st line cout<<board[1][0]<<" …

Member Avatar for VernonDozier
0
904
Member Avatar for QuantuMechanic

Greetings all, I have written the following code to calculate the solution to a system of ODEs, called the Matsuoka equations, by using the Runge-Kutta 4th order method. I am trying to implement this code on an Arduino microcontroller. The output of the equations, IC[0] - IC[2], should oscillate but …

Member Avatar for QuantuMechanic
0
393
Member Avatar for lochnessmonster

i am currently using the writefile() windows api function in my program, i want to store the follow in 1 buffer but i'm unsure on how to do this exactly [CODE] "===================================" '\n' "Date: " localTime->tm_mon "/" localTime->tm_mday "/" localTime->tm_year '\n' "Time: " localTime->tm_hour ":" localTime->tm_min "." localTime->tm_sec '\n' "===================================" …

Member Avatar for maybnxtseasn
0
2K
Member Avatar for jacob07

Hello, i'd like to make a program which reads input until end of file on standard input and when i press ctrl-d (or i'm not sure how to end it) it writes out the lines which contain a string. so if i start with : ./a.out cond First line Second …

Member Avatar for jonsca
0
155
Member Avatar for aztechkiraly

Hi everyone should be a big help to me. I finished a program and i need better gui. The gui is simple same as now only need to add one logo. Here is the program with source code: [url]http://www.multiupload.com/OO5AVH60KA[/url] Here is the current gui: [URL=http://img13.imageshack.us/i/guil.jpg/][IMG]http://img13.imageshack.us/img13/8633/guil.jpg[/IMG][/URL] I want someone to add …

Member Avatar for daviddoria
-3
102
Member Avatar for Howdydoody

Im making a separate chaining hash table for dictionary words. In my insert method i use find to make sure there isnt a duplicate. Every thing compiles but my program stops at the find statement and quits working. If i omit the find method, which ok for the first word …

Member Avatar for Howdydoody
0
131
Member Avatar for aaronmk2

I am trying to combine the string NCards and Scards into one string called Tcards. I am using # include <cstring> and I get an error. How would I fix this. All the variables are strings. [CODE] void deck::deal() { Tcards=strcpy(Scards, Ncards); }[/CODE]

Member Avatar for Lerner
0
107
Member Avatar for jrhitokiri

I have this game that I play which had a new sub-game: a Guitar Hero clone. Problem is, the controls are just too darn uncomfy. Another problem is that you can't change your controls. So, what I did was I searched for a keyboard mapper that needed no restarting. I …

0
77
Member Avatar for gl7

i am new to c++ and learning about vectors now and vector member functions, so my question is more a logical question. my question is dealing with the .begin() member function, i now it sends the iterator to beginning of vector but i am confused on what it returns. i …

Member Avatar for gl7
0
203
Member Avatar for lochnessmonster

whenever u create a string like this... std::string name = "HELLO THUR"; what size buffer does the constructor store the string in when instantiating this string object? im curious thx!

Member Avatar for WaltP
0
163
Member Avatar for shylesh_kerala

[CODE]#include<stdio.h> #include<iostream.h> #include<conio.h> void main() { int size=5,i,j; clrscr(); //cout<<"Enter the length of array : "; // cin>>size; int *array = new int[size]; cout<<"Enter elements "<<endl; for(i=0;i<size;i++) cin>>array[i]; for(i=0;i<size-1;i++) { for(j=i+1;j<size;j++) { if(array[i]>array[j]) { int temp; temp=array[i]; array[i]=array[j]; array[j]=temp; } } } cout<<"Sorted array"<<"\n"; for(i=0;i<size;i++) cout<<array[i]<<' '; for(i=array[i];i>0;i--) { delete[] …

Member Avatar for Moschops
0
164
Member Avatar for margeaux54

array1 and array2 is my ascended ordered arrays ı want to put this arrays into the array3 and then ı want to write ouput.txt you can understand better my codes. [CODE] for( int i=0; i<21 ;++i) { if (array1[d].ave> array2[e].ave) array3[i].ave=array2[e].ave; e = e+1; if(array2[e].ave>array1[1].ave) { array3[i].ave = array1[d].ave; d=d+1; …

Member Avatar for Ancient Dragon
0
218
Member Avatar for omidagha

Create a class DoubleSubscriptedArray, the class should be able to create an array of any number of rows and any number of columns with dynamic memory allocation. The class should supply operator() to perform double-subscripting operations. For example, in a 3-by-5 DoubleSubscriptedArray called a, the user could write a( 1, …

Member Avatar for arkoenig
0
113
Member Avatar for anraevlus18

Hi, I am very new to C++. In my code i am using readline to get the user input which is a command and that input will be processed accordingly. When user enters a command named "setflag", i should set a flag to TRUE in all the active sessions of …

0
88
Member Avatar for ccw87

Hi, I'm doing 6Lowpan adaptation layer using c++. I would like to create an array of linked list - each element of array consists a linked list - each linked list links all fragments of same tag together according to their offset Is this correct? myarraytype* myarray[myarray_size] = mylinkedlist; Thanks. …

Member Avatar for dkalita
0
68
Member Avatar for Jennifer84

The below code do connects to the server successfully. It is a working code. Now for example is not the server avaliable. So I receive this error even that I have put this in a try{}catch{} The error is below, and I wonder how I can [B]shut this error off …

Member Avatar for Jennifer84
0
378
Member Avatar for iamcreasy

[CODE]#include<iostream> using namespace std; class Node { public: int data; Node *preNode; Node *postNode; //Node(){} }; int main() { Node testNode; Node testNodeB = testNode; return 0; } [/CODE] When I run the code, there occurs an runtime error, The variable "testNode" being used without being initiated. But when write …

Member Avatar for iamcreasy
0
160
Member Avatar for user129

I would like to write a network quiz game. I would like it to work over a network (using sockets - TCP/UDP), with at least two players. The server will serve the questions. The clients can find the server application using an IP address. Could anyone give me an idea …

Member Avatar for jonsca
0
86
Member Avatar for biancaW

please someone edit this code for me. I do not know how to write the logic part in the function 'TestAnagram' when i debug it, it shows the same word twice instead of showing two different words using the same letters in different order . [CODE]#include <iostream> #include <string> #include …

Member Avatar for L7Sqr
0
403
Member Avatar for L3gacy

I was wondering if there is a for_each function in c++, I have searched for it on the internet and I cant seem to find a definitive answer, is it in the new draft for the c++x?

Member Avatar for L3gacy
0
203
Member Avatar for Labdabeta

I need a few helps for some things that I just cannot get the syntax of! (I need these, and if you don't believe me I can post the reason) 1) Creating a function within a function 2) Creating a class within a function 3) Declaring a template function outside …

Member Avatar for mike_2000_17
0
139
Member Avatar for DaniwebOS

When dealing with larger programs and your starting from scratch should you split classes using headers and the .cpp files from the very beginning? I am looking for a suggestion because I find 200-300 lines all on one file really annoying to scroll up and down or even when its …

Member Avatar for DaniwebOS
0
68
Member Avatar for passcode121

Hi, i am having a really hard time solving the following problem. it looks really simple, but i cannot find a good implementation for it !! if you have a good algorithm please tell me about it, thanks The Problem: Source File: coindst.c/ cpp/ pas/ java Input: coindst.in Output: coindst.out …

Member Avatar for passcode121
0
1K
Member Avatar for gazsroeposc

Hello! I have an ipv6 address in a string, like 2001:0db8:0000:0000:0000:0000:1428:57ab I have to store it in two __int64. how can i convert this? Thx

Member Avatar for gazsroeposc
0
2K
Member Avatar for oab2003

The code below was written using C++.NET framework. How will the code be completed to retrieve all the records from microsoft access 2003 table PROFILE and display them in a form? [CODE] private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) { ADODB::Recordset ^ rst=gcnew ADODB::Recordset; ADODB::Connection ^ conADO; Object ^ obj; String …

Member Avatar for Ancient Dragon
0
180

The End.