49,761 Topics
| |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
[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: … | |
can u all help me how to write code to generate auto log file..based on date n time.. | |
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 … | |
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. | |
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 … | |
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] | |
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 … | |
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 … | |
| 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 … |
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 … | |
[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 … | |
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 … | |
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 … | |
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 = … | |
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 … | |
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 … | |
Can any1 tell me what is Cross-Typing???? | |
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 … | |
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 … | |
| 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? |
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, … | |
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 … | |
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 … | |
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 … | |
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 … |
The End.