49,761 Topics

Member Avatar for
Member Avatar for peachslasher

Hey guys, I need to write a C++ program that use to compare sorting algorithm. I've tried to implement counter on each of <.>, = operations I've encounter in the function (currently i am working on selection sort), however the sum of the counter doesn't really match big O selection …

Member Avatar for Radical Edward
0
275
Member Avatar for dan_e6

hey guys. ive been asked to do this: Write a recursive function which returns true if the linked list is sorted in ascending order. bool isSorted(nodeType *L) why would we use a recursive function to check if it's in ascending order? can anyone help me with this.

Member Avatar for n1337
0
463
Member Avatar for wellibedamned

i'm trying to get the last word of the sentence using strtok.. i tried this :[CODE]while (tok != NULL) { tok = strtok (NULL, " "); if((tok != NULL) && (strtok(NULL, " ")==NULL)) printf("%s", tok); }[/CODE] kinda doesn't work... anyone knows why? Yes, tok is a char * pointer..

Member Avatar for Nick Evan
0
77
Member Avatar for timdog345

[code] //test SAT /* void initialize (int& verbal, int& writing, int& math) { verbal=0; writing=0; math=0; } void userInitialize (int& verbal, int& writing, int& math) { cout<<"Please enter your verbal score (0-800) "; cin>>verbal; cout<<endl; cout<<"Please enter your writing score (0-800)"; cin>>writing; cout<<endl; cout<<"Please enter your math score (0-800)"; cin>>math; …

Member Avatar for Nick Evan
0
143
Member Avatar for qt.alan

i am trying to load the morsecode.txt into my tree struct but when i compile it i keep getting this errors error C2440: '=' : cannot convert from 'decode *' to 'int *'| error C2664: 'bintree<dataType>::insert' : cannot convert parameter 1 from 'int' to 'const decode &'| error C2676: binary …

Member Avatar for mitrmkar
0
152
Member Avatar for e_pech

Hey! I need to write a compiler for a microcontroller I'm designing... I want to use MFC to check the Syntax. I created a project in wich the View is derived from the RichEditView, Can anyone help me get info on how I can accomplish this?? I need to check …

Member Avatar for e_pech
0
98
Member Avatar for FTProtocol

Im just beginning to learn c++ and this is about the second day. Just wondering what you guys think and ways of improvement, efficiency and such. Thanks guys! [CODE] /* Super Simple Calculator - Created By FTProtocol */ #include <iostream> #include <math.h> #include <stdio.h> #include <windows.h> #define nl '\n' int …

Member Avatar for Nick Evan
0
144
Member Avatar for FTProtocol

Do you guys have any idea where I've gone wrong? [CODE] /* Super Simple Calculator V3.0 - Created By FTProtocol */ #include <iostream> #include <math.h> #include <stdio.h> #include <windows.h> #include <conio.h> #define nl '\n' #define PI 3.14159265 const double a=5; const double b=3; const double c=8; int x,y,choice; int ans=0; …

Member Avatar for Nick Evan
0
109
Member Avatar for MAD_DOG

Let me ask you guys something what is the toughest type of Programming Language on techtalk?

Member Avatar for azwiz
0
330
Member Avatar for allwiyn

[B]Hi, How to write a function that checks if the circle passes through given four points.. please answer this with code or just give me the logic and concept of writing this...[/B]

Member Avatar for VernonDozier
0
107
Member Avatar for Jennifer84

I have push_back(ed) Lines in 6 "places"/for 6 elements lika below in a 2D vector. So each element of the 6 consist of different many "MainLines". So when I am trying to get these out in the OutPut, I know I will use any kind of ::iterator and knowing begin() …

Member Avatar for John A
0
96
Member Avatar for Miyamoto

Why inheritance requires virtual functions? I read this from a book : Because inheritance generally requires the use of one or more virtual functions (a virtual destructor if nothing else), you don't want any hierarchy for small, heavily used objects. Thank you

Member Avatar for Duoas
0
89
Member Avatar for savinki

Hi, I want to assign a char pointer value to enmerated value, to use in a switch statement. Given below is the code segment. I dont hv an idea how to convert and assign char pointer value to a enumerated value. Pls can someone help me to resolve this [code=cplusplus] …

Member Avatar for Duoas
0
153
Member Avatar for fusi0n423

I'm working on a lineEditor class (doubly linked list) and I'm switching it from using std::string to a template but I keep getting: lineeditor.cpp(33) : error C2143: syntax error : missing ';' before '*' when compiling. The code is: [code=c++] template <class T> int lineEditor<T>::getSize() { return maxLineCount; } template …

Member Avatar for Duoas
0
106
Member Avatar for Nemoticchigga

Is there a way to make a visual studio 2005 form repaint itself every 'x' number of milliseconds? Thanks.

Member Avatar for Nemoticchigga
0
53
Member Avatar for Jennifer84

I am doing a loop that will run all the time and when a change is done to the File(Source), then this file will be Copied/OverWrite file(Dest). One problem that I have is that the if-statement that says: [B]if( CurrentSourceTime != LastSourceTime ) {}[/B] is running each loop ? I …

Member Avatar for Jennifer84
0
107
Member Avatar for lahom

[B]hi i have this function:[/B]Public Function GetFile(Filename As String) [CODE]Dim path As String Dim Fnum As Integer '---read file in one pass! Fnum = FreeFile Open Filename For Input As #Fnum GetFile = Input(LOF(Fnum), Fnum) Close Fnum Exit Function ErrorHandler: Err.Description = "GetFile: " &amp; Err.Description &amp; " -&gt; " …

Member Avatar for mitrmkar
0
271
Member Avatar for xyinyangx

I am in a c++ programming class in my High School, and I am having some trouble with the final I was assigned. We were assigned to make a video game, so I decided to make a text adventure. My code is basically a bunch of if statements telling the …

Member Avatar for xyinyangx
0
756
Member Avatar for scarface3288

This is the file I will be calling from, basically it stores something into a file called "temp.txt, so let's assume that it works and the problem is not here. This is the "file.h" file. [CODE]#include <iostream.h> #include <fstream.h> #include <string.h> #include <stdlib.h> ofstream output_file("temp.txt", ios::out); class NUM_STUD: { public: …

Member Avatar for scarface3288
0
100
Member Avatar for Kob0724

I"ll preface this with the fact I'm pretty new to C++ (my background is in Java, so having to deal with these pointers is proving to be a little confusing). I'm trying to iterate through a vector that I passed to a function. I can't get this code to work …

Member Avatar for Kob0724
0
263
Member Avatar for daviddoria

This doesn't seem to behave as I would expect (as it does in matlab, for example). I want to execute a command, but give some readable output instead of the often very messy auto-generated error (index out of range or something). [code] try { MyFunction(1,2); } catch(char* str) { cout …

Member Avatar for daviddoria
0
90
Member Avatar for sash007

A programme in C++ that if date is input it tells day? For example Enter Date : 1-01-1985 The day is 'Monday' Enter Date : 2-01-1985 The day is 'Tuesday' Restriictions are using If-else, switch,operators(/,%,*,+,-) while loop.logical operations(&& || ) Please write the programme or Explain the logic It starts …

Member Avatar for sash007
0
134
Member Avatar for Nemoticchigga

I am doing a windows forms application in Visual Studio 2005. I have all the forms, as well as some additional classes in source files for data storage. I was wondering how to update data in one class based on another class. Does this need to be done through a …

Member Avatar for Duoas
0
102
Member Avatar for Lukezzz

I am using VC++ 2008 and wonder, that if I have made a project. "Windows Forms Application" that only consist of an Emty Form. I wonder how it is possible to Compile this so this will be an application. I have searched around in the properties and found something called …

Member Avatar for Lukezzz
0
118
Member Avatar for dophine

Hi all, there is a big project which consists of different folders and makefile. I want to build just part of the project using eclipse since every time I build is to build the whole project. Is there anyone knowing how to do?

0
49
Member Avatar for Beemer

Hi all I have written a program to issue a bursary according to the amount of modules passed in 2007 and the amount registered for in 2008 , basically if the student did not pass any modules in 2007 :no bursary if the student passed 1 or 2 modules in …

Member Avatar for Salem
0
98
Member Avatar for usmanabb

it says two teams A & B have to play a match, and we have to find probability of team A. I can't understand the way to calculate its percentage. The main points are: 1) the match is played by two teams: A and B; 2) the first team to …

Member Avatar for usmanabb
0
665
Member Avatar for blackbeard

I have an assignment to make a text-based snakes and ladders game using Dev-C++. I have so far made a splash screen and a menu (with colours and sounds, pretty cool) using the winmm.a library and the switch/case construct. I have even been able to get player names with a …

Member Avatar for blackbeard
0
1K
Member Avatar for mancmanomyst

Hello Everyone - I'm sorry if iasking a repeat question but i've searched the forums and cant find out what's going wrong. I am writing a program that has a pure virtual base animal class that has three subclasses - Cow, Chicken and Sheep. Objects of the three types are …

Member Avatar for Ancient Dragon
0
96
Member Avatar for Jennifer84

I am trying to write a program that can sense if Any changes was made to the file: [COLOR="Green"]"C:\\Folder1\\One\\File5.txt"[/COLOR] If Any changes was made, then this file will be copied to destination: [COLOR="green"]"C:\\Folder1\\Two\\File5.txt"[/COLOR] So what happens is that the destinationfile will be "Overwrited". I have started out som code but …

Member Avatar for Jennifer84
0
142

The End.