49,761 Topics

Member Avatar for
Member Avatar for shiny27

Hi... I want to insert a variable [I]finalScore[/I] into an array [I]competitorsArray[competitorCounter] [/I]. I can't find any instructions anywhere on how to do this, so I'm wondering if it's even possible. Also, how do I output an error message if the user enters a number that I then store into …

Member Avatar for Ancient Dragon
0
191
Member Avatar for ankit,joy

I have to [B]sort around 12GB of integer data[/B] which is kept in a file. I have a [B]1 GB RAM[/B]. How should I do it? The problem is I cant read whole of data together and store it in a vector because it goes out of memory bound. Which …

Member Avatar for arkoenig
0
505
Member Avatar for cppgangster

Hi, I am trying to write function overloaded function template, but I get some kind of an instantiation problem and here is my code: [CODE] /* * File: main.cpp * Author: cppguy * * Created on 20 January 2011, 19:10 */ #include <cstdlib> #include <iostream> #include <cctype> #include <cwctype> #include …

Member Avatar for vijayan121
0
183
Member Avatar for fand2nd

Can someone pls explain to me this program is not running [CODE]#include <iostream> using namespace std; void writeBackward(string s, int size) // function definition { //opening brace if ( size > 0) { // opening brace for the condi cout<<s.substr((size-1), 1); //display the last chracter writeBackward(s, (size-1)); //display remaining characters …

Member Avatar for vinayakgarg
0
95
Member Avatar for HENRYSUGAR

Hi, I am trying to write a simple c++ script to learn more about file manipulation. First script is adding some info a file as a structure and second one is reading from the file. However when i try to read from my file it always shows the found values …

Member Avatar for HENRYSUGAR
0
161
Member Avatar for Ieako

[code=cpp] #include<stdio.h> #include<math.h> #include<stdlib.h> int minimal(int seed); int main (void)//random=countpassenger; { int check=0, tempEarnings, ctr4, info[17][31],ctr3,capacity=0, ctr, ctr2,denomination[6]={1,5,10,20,50,100}, x[6],seed, random=0, loose=0,y[17]={0}, a, change, money, passenger=0, destination, station, pay, payment, n ,km, earnings, out[17]={0}; int passengerlimit[17]={0,30,15,10,10,15,20,10,10,20,5,20,15,10,10,5,0}; printf("Hello, Good day!\nWelcome to our bus! Just seat back and relax.\n\n"); printf("Please enter the seed: …

Member Avatar for al john
0
163
Member Avatar for lin80

can u all help me how to write code to generate auto log file..based on date n time..

Member Avatar for lin80
0
29
Member Avatar for lanzslumber

Hello, I'm a beginner in these to programming language. Here I want to know how to display the actual value of variable of enum holds. Like this in C++: [code] #include <iostream> #include <conio.h> using namespace std; int main(void) { enum Difficulty { Low = 1, Medium, High }; Difficulty …

Member Avatar for ddanbe
0
245
Member Avatar for user543820

hi! i want to print a colored 'A' using putchar, let's say green. i am able to print * by doing just putchar('A'); but i don't know that how to print a colored 'A'. i have also tried to write: putchar('A',255); and also putchar('A',3); but no success.

Member Avatar for embooglement
0
260
Member Avatar for Spartan_MSU12

I am compiling my two .cpp files that are linked with header file. i am getting the error ~/...>g++ -o test.exe diamondtest.o main.o Undefined first referenced symbol in file Diamond::Diamond(int) main.o Diamond::Diamond(int, char) main.o ld: fatal: Symbol referencing errors. No output written to test.exe collect2: ld returned 1 exit status …

Member Avatar for daviddoria
0
126
Member Avatar for TailsTheFox

Hello, I'm trying to make a program, and can't figure out the correct way to use [ICODE]Form::Diologue[/ICODE] I allready know you have to do someting like this: [CODE] #include "Form2.h" Form::ShowDiologue(Form2()); [/CODE]

Member Avatar for TailsTheFox
0
88
Member Avatar for TheWolverine

Hi all, I've scoured the internet for examples that would allow me to figure out how to apply functors in my specific case, but I just can't seem to make the shift from the examples I find to figuring out how to use it for my own code. Here is …

Member Avatar for TheWolverine
0
93
Member Avatar for iokon

Hi to all! In the following code I am trying to implement a non-directed graph using adjacency lists. Even though there are no compilation errors, I don't get any results. When I am debugging the code it seems that there is a problem when I try to insert a second …

Member Avatar for iokon
0
2K
Member Avatar for trebor-pl

Hi, i'm not very good at OOP, basically just started it. My program basically its like a system for a game shop, the main isn't fully done yet, however main isn't a problem. The other files must contain some kind of problem in them. Well enough of the talk, I'll …

Member Avatar for trebor-pl
0
338
Member Avatar for mahesh20081984

Hello, How can i create / edit the details that shown in the property -> version tab of an executable file . ie which can be taken from window's explorer mouse right click context of an exe file. The exe file was created using MINGW and qmake. thanks in advance …

Member Avatar for alexchen
0
85
Member Avatar for Zvjezdan23

[CODE]#include <iostream> #include <string> using namespace std; int main() { // A switch program that shows the user his input choice string word1 = "Achieve"; cout << "Welcome to Your AccuWeather Report Screen." << endl; cout << "Your choices are listed at the bottom." << endl; cout << "Number 1 …

Member Avatar for WaltP
0
133
Member Avatar for Rimojenkins

Sorry about the title, but I thought it would be interesting. Here is my problem. I am supposed to convert a certain input into a desired output. The input is 2 201101190930 F76.4 201101191330 C16.3 The first number is the number of strings in the file. It then goes YYYYMMDDHHMM …

Member Avatar for Rimojenkins
0
114
Member Avatar for ana_1234

I'm working on a program that reads a line of code and stores each word into an index or a array of string and I'm stuck. Its a small part of a larger project I must used cin.getline: [CODE]#include <iostream> #include <string> #include <cstring> #include <cctype> #include <iomanip> using namespace …

Member Avatar for griswolf
0
86
Member Avatar for BanKuZ

hi all, I have a class A that has a char* var, operator and methods. In addition I have a global func(char*s). I would like to run this code from the main function by adding operators to my class, I need help writing them. [CODE]A* pA; ... A** ppA = …

Member Avatar for BanKuZ
0
256
Member Avatar for NicAx64

circle.h [code] // // circle.h // defines the functions to draw circle. // #ifndef CIRCLE_H #define CIRCLE_H #include <windows.h> typedef struct tagCircle { int x; int y; int radius; } Circle; /* set the window handle */ void SetWindowHandle(HWND); /* set pixel @parms int x xposition @parms int y yposition …

2
495
Member Avatar for atticusr5

Hello, I have a program with the following variable: [CODE]char dateCode[13];[/CODE] and the this type of data is held by the variable -> 2011006+0000 Now if i want to print only 2011006, and ignore the + and everything after, is there a way to do that in c++? Would i …

Member Avatar for atticusr5
0
98
Member Avatar for Zvjezdan23
Member Avatar for rohan1020

I want to make a program that can take sound input from a microphone, and determine if the sound is one of three pitches (or maybe decibels). Can someone please help me to write a C++ program which could identify and process various characteristics(frequency, amplitude) of the sound from the …

Member Avatar for jonsca
0
129
Member Avatar for Ana_Developer

Hello everyone, I am using the code in the following website ([url]http://www.adp-gmbh.ch/win/misc/sockets.html#test[/url]) that is a ready Socket and Client class for connecting to a website. But in the Client.cpp code, if I put a query for Google instead of the host name in the send() method, I get a bad …

Member Avatar for drkybelk
0
205
Member Avatar for Fjolsvidr

I just wrote a little console app using the Visual C++ 2010 Express. But it doesn't run on other computers. I did a little research but it says I have to install redistributable package on the other pc, isn't there any other way to run the simple application?

Member Avatar for Fjolsvidr
0
123
Member Avatar for SolidSora

I'm working on a seat diagram program, and it's not reading the input how it should. Also when the user enters a seat it should change the letter to an X. The program isn't reading the input correctly. When I tell the program to print the seat the user picked, …

Member Avatar for SolidSora
0
172
Member Avatar for kevinyu

Hello people, I need some help regarding the insertion/deletion of data in the middle node. My problem is, if you insert a node on the middle, the existing middle node gets replaced (the nodes between the inserted node in the middle should only move left and right). And when I …

Member Avatar for Fbody
0
146
Member Avatar for dip7

Hi, I am have written a program in C but using Dev-C++ to run it. I have compiled my source code in c. however, my output window does not stay. I tried adding system(“PAUSE”); before return 0, but it does not work. My program has both return 1 and return …

Member Avatar for Ancient Dragon
0
93
Member Avatar for cbsinc

I need some pay for play tutoring. I have a jammed schedule and don't want someone to do my work for me, but need direct and timely answers to questions, immediately. I don't have time to trial and error, or tough love learning. I take good notes, learn fast, and …

Member Avatar for Ancient Dragon
0
97
Member Avatar for BimBam

Hi guys :) I'm currently trying to do something I don't have any experience with, and I did not really understand what ixQuick found for me .. So I try here, hoping someone shouts 'oh, done this million times, it's a piece of cake' ;) So, I'm using Visual Studio …

Member Avatar for BimBam
0
90

The End.