49,757 Topics

Member Avatar for
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
316
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
158
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
466
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
127
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
162
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
217
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
530
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
Member Avatar for new2programming

i am trying to code my sprites to collect items which then display a score in the top left of the screen depending on which items they collect, each sprite has their own item and there is an item which deducts score. However i am at a loss as to …

Member Avatar for new2programming
0
58
Member Avatar for rowley4

I am getting a few errors on my code. I know my INT and CHAR are not correct. Just not sure where. I am trying to pull data from a file. The data is a day ( and integer 01, 02, 03) a time of day HH:MM, and a level …

Member Avatar for daviddoria
0
122
Member Avatar for cl2020

I have a code, so far I have a problem: what is those mean? error C2143: syntax error : missing ')' before 'constant' line 65 error C2059: syntax error : ')' line 66 error C2143: syntax error : missing ';' before '{' line 67 error C2181: illegal else without matching …

Member Avatar for NathanOliver
0
132
Member Avatar for gregarion

Hey guys, i am working with a program to basically read an input for a file and then storing it into a vector. my text file is called Sample.txt and contains data like this.. [CODE]How are you coping with programming? The quick brown fox jumps over me.[/CODE] Here are my …

Member Avatar for NathanOliver
0
92
Member Avatar for phummon

Hi folks, General question here... I'm writing a program which reads a ton of source data, crunches the numbers, and outputs a few nice summary reports. The source data is a lot of individual records: [B]00001,Item1,Item2,Item3,Item4,Item5,... 00002,Item1,Item2,Item3,Item4,Item5,... 00003,Item1,Item2,Item3,Item4,Item5,...[/B] Originally, I created an object called "Record," which stored each Item. But …

Member Avatar for NathanOliver
0
181

The End.