49,761 Topics

Member Avatar for
Member Avatar for aaronmk2

The if statment I am using in my main program is not working, it should return the else value, but is returning the information in the if part of the statment and then it causes a run time error. I am not sure what is going wrong. [CODE] que1.add("Fish"); que1.add("Whale"); …

Member Avatar for mbulow
0
135
Member Avatar for bobbyg118

I need some help. I want this program to ask the user how many grades they would like to enter. Than when the user inputs it should ask for the prompt enter your grades as many times as the user wanted. Than assign each letter to the number of grades. …

Member Avatar for mlesniak
0
102
Member Avatar for maharjun

Hello people, im basically looking for a method to create a class called "real_no" which has the capacity to store numbers as they are. i.e if the input is given as 2 + Root(2) then i should be able to store it as 2 + Root(2) and not 3.414. also, …

Member Avatar for maharjun
0
102
Member Avatar for God Coder123

Hey Guys i seem to be having an issue with the follwoing code when i complie in VC++ 2010. It compiles fine in both minGW and VC++ 2008. The code is as follows... The Program accepts three inputs whereby it outputs them in alphabetical order, very simple. [CODE]#include <iostream> #include …

Member Avatar for God Coder123
0
134
Member Avatar for arshad115

Hi,I want to make a program to search for files in a particular Directory,can anyone please tell me the basic functions to open directories and files(not txt files) in Visual Studio 2008.How to open a directory,and check the files in that directory,etc? I can do this in Unix by using …

Member Avatar for mitrmkar
0
155
Member Avatar for aaronmk2

I am tring to remove three string from a que using nodes. When I try to remove the third one it does so, but then I get a debugging error. I think the problem is that I am not deleting the last node but I cannot figure out what I …

Member Avatar for arshad115
0
130
Member Avatar for Suarli

Hi; in Ubuntu and C++, i need the code to obtain and show for screen myself MAC. Can you help me?. This is part of a big program and it's the only thing which i have problems I can use: #include <algorithm> #include <cassert> #include <iostream> #include <sstream> #include <vector> …

Member Avatar for daviddoria
0
161
Member Avatar for BaluM

Hello All, Could you please help me on below issue!!!! I am write and read binary file as below, when i write array to file it was writing good but when i read same array i am always loosing last values and below is the code for both operations. Writing …

Member Avatar for BaluM
0
319
Member Avatar for anuragcoder

Hi guys! I want the user to enter the day, month and year in a dd/mm/yyyy format. But what i've written doesn't seem to work. Code: [CODE]char d[2]; char m[2]; char y[4]; cout << "Day:"; gets(d); cout << "Month:"; gets(m); cout << "Year:"; gets(y); [/CODE] In the output, it doesn't …

Member Avatar for anuragcoder
0
209
Member Avatar for spartanace

My file structure is Project data sort main.cpp code as follows [CODE]#include <cstdlib> #include <iostream> #include <fstream> #include <string> #include "genlist.cpp" #include "genstring.cpp" using namespace std; int main(int argc, char *argv[]) { ifstream in; ofstream out; int unique=0; GenList<string> gList; gList.checkFileOpen(in,out); gList.populateNUnique(in); gList.sort(1); gList.output(); in.close(); system("PAUSE"); return EXIT_SUCCESS; } [/CODE] …

Member Avatar for mrnutty
0
159
Member Avatar for new2programming

How do i incoporate this countdown timer into my main? ive given it a go but it comes up a black screen.. timer: [CODE]/* clock example: countdown */ #include <stdio.h> #include <time.h> void wait ( int seconds ) { clock_t endwait; endwait = clock () + seconds * CLOCKS_PER_SEC ; …

Member Avatar for new2programming
0
216
Member Avatar for fellixombc

Alright, so everything works, except there are a couple minor bugs. Also, is there a more efficient way in doing my listen method? Thanks. Bugs: -First client does not recv the information it sent, until the 2nd client connects. (the server sends it back) -Everyother click recv's everything twice. Server.cpp …

Member Avatar for fellixombc
0
470
Member Avatar for aaronmk2

The if statment I am using in my main program is not working, it should return the else value, but is returning the information in the if part of the statment and then it causes a run time error. I am not sure what is going wrong. [CODE] que1.add("Fish"); que1.add("Whale"); …

Member Avatar for NathanOliver
0
83
Member Avatar for daviddoria

I'm having a bit of trouble with dynamic_casting. I need to determine at runtime the type of an object. Here is a demo: [code] #include <iostream> #include <string> class PersonClass { public: std::string Name; virtual void test(){}; //it is annoying that this has to be here... }; class LawyerClass : …

Member Avatar for daviddoria
0
71
Member Avatar for drt_t1gg3r

I am in need of clarification. I am still a 'noob' when it comes too C++. I get a lot of the basic stuff except passing arguments. I understand that you can pass by reference and by pointer and by copy. but things start getting really confusing from that point …

Member Avatar for drt_t1gg3r
0
184
Member Avatar for anuragcoder

Hi guys, I've compiled the code given below which allows the user to enter the address of a text file and then view it(the whole thing). But, as soon as input is taken, "openfile.exe has encountered a problem and needs to close. Send Error Report." When I Press Debug something …

Member Avatar for abhimanipal
0
193
Member Avatar for Osas106

Good day my every one outthere, first let me start by saying that i am a complete novice to c++ programming. i got myself into some trouble while debugging a win32 program in 2008 V.studio. i did post this thread some 24 hours ago but no good result so far. …

Member Avatar for Ketsuekiame
0
128
Member Avatar for supidProgrammer

Hi! I´m new in this Forum. My problem is: I have two functions for replacing characters in a string. One in C++ other in inline Assembly: Example: Source string "björk" to destination string "bjork" In C++: [CODE] void ReplaceChar(char* s, int len) { for (int i = 0; i < …

Member Avatar for supidProgrammer
0
196
Member Avatar for programing

Hi ,all I hope that everybody will be fine I have q; How do I write simple [very simple] code that receives letters with stack [push,pop,over flow,under flow] for example . output: Enter later: A B C D E EDCBA i writed code that receives number .. but i face …

Member Avatar for NP-complete
0
146
Member Avatar for drunkenmonk

I'm trying to implement the non recursive traversal in a binary tree. I am having trouble getting started with my stack, and have no idea where to begin here. I have written a stack to hold int's before, but never to hold nodes(or whatever it needs to hold...pointers?) Here is …

Member Avatar for Narue
0
91
Member Avatar for ghost_from_sa

hey guys, im having a slight issue with overwriting a certain record that is selected by a user Basically my application is meant to get user in puts and store them in a file which is refered to when updating, adding a new record, deleting, searching etc here is the …

Member Avatar for nbaztec
0
173
Member Avatar for anantk

I'm making a basic football (soccer) manager game as my school project. Most of the other stuff is sorted out, but the scheduler is not working... [B]Background:[/B] I'm simulating the English Premier League,which has 20 teams. Each team plays 38 matches (exactly one match per week over 38 weeks) in …

Member Avatar for anantk
0
218
Member Avatar for aqidis

Hey everyone! I have a problem with my lab if anyone could help check my code that would be great. I'm supposed to write a program that asks a user for two strings and checks if the beginning of the second string appears anywhere in the first. It's also supposed …

Member Avatar for griswolf
0
533
Member Avatar for didi00

Hi everyone! So my task is this: Make a program in C which runs three processes (A,B,C), which use a common memory (buffer). Process A generates 50 random numbers and writes then into the buffer. Process B writes down every even number into file F1. Process C writes down every …

Member Avatar for didi00
0
337
Member Avatar for justme369

can anybody help me transcribe this into vb.net [code] public string WriteNReadBuffer(byte [] TelnetNegotiation, NetworkStream stream) { stream.Write(TelnetNegotiation, 0, TelnetNegotiation.Length); Byte[] data = new Byte[256]; Int32 bytes = stream.Read(data, 0, data.Length); string returnval; returnval = BitConverter.ToString(data, 0, bytes) + "\r\n"; //textBox2.AppendText(BitConverter.ToString(data, 0, bytes) + "\r\n"); return returnval; } public void …

Member Avatar for Teme64
0
286
Member Avatar for daniel88

Hi guys, Looking at this I know it is straightforward, but that hasn't meant that I have been able to get the solution - so here I am! I am entering serial numbers into a set container which is of type string. I want to be able to enter serial …

Member Avatar for daniel88
0
103
Member Avatar for tinanewtonart

So for this assignment we have to inherit from the base class 'Game' I think I have with my version named 'ChildGame' I would like help with checking the syntax of my function calls from main() [CODE] /*************************************************************************************** Programmer: C.Backlund Program: TicTacToe_1.cpp Purpose: A tic tac toe game Date Created: …

Member Avatar for tinanewtonart
0
1K
Member Avatar for gcardonav

Hi: I need to create a C++ code that will read a file and then used some of the numbers in the file for some calculations. The file will look like the following: [CODE]#IMAGE NPIX MEAN STDDEV MIN MAX 002.jpeg 1048576 1984. 490.1 1870. 65535. 003.jpeg 1048576 1984. 471. 1875. …

Member Avatar for gcardonav
0
132
Member Avatar for bazoka121

Hello to everyone. I am working on pattern matching. Problem is that I have match source codes weather they are copies or not (c++ source code only). take two .cpp files and match them. and result that if they are match or not.. Please help me. Thanks in Advance.

Member Avatar for abhimanipal
0
116
Member Avatar for jl_7

I have difficulties solving this program, so I'll be very happy if someone h elps me. Thanks in advance! Find a way in a maze Write a program that finds way between two points in certain maze. The maze is rectangular matrix which consists of cells. Each cell is from …

Member Avatar for murdokk
0
225

The End.