481 Posted Topics

Member Avatar for gr8 icon

I agree with mosaic. [code=cplusplus]int main(void){ system("notepade.exe"); return 0; }[/code] Chris

Member Avatar for death_oclock
-2
143
Member Avatar for majesticmanish

It should be noted that using ifstream with >> operator defaults to skipping whitespace characters, which '\n' is also included in. if you want to proccess the'\n' in a special manner then you should use the following loop condition [icode]while(fp1 >> noskipws >> ch)[/icode] Not that you do not need …

Member Avatar for majesticmanish
0
170
Member Avatar for lakshmi mani

Guess what, there's only one person at this forum who is capable of getting the answer and thats [I][B][U][COLOR="Red"]YOU[/COLOR][/U][/B][/I]! Chris

Member Avatar for Freaky_Chris
0
120
Member Avatar for AdRock

[code=cplusplus]class a{}; class b: public a{}; class c: public a{};[/code]The very short example lol

Member Avatar for AdRock
0
157
Member Avatar for LucyB

Um sounds to be link you want something like this. [code=cplusplus] aVariable += anotherVariable;[/code]

Member Avatar for 1bennyd
0
147
Member Avatar for mmeyer49

I'd consider reading about stringstreams and better methods of processing inputted data. [url]http://www.daniweb.com/tutorials/tutorial71858.html[/url] Chris

Member Avatar for mmeyer49
0
161
Member Avatar for Dani

You might want to shoot me before you start reading but meh lol. I use Google Chrome.....*runs* on my older PC because it's somewhat faster than the alternatives. Anyway basically drop down menu's don't work. Instead of being given the drop down menu it just redirects you to the default …

Member Avatar for William Hemsworth
0
865
Member Avatar for Somali Rathore

For basic ASCII which I presume you will be using, then you can just check the character range. and swap accordingly. IE, 65-90 is capital etc Chris

Member Avatar for Aia
0
195
Member Avatar for Iruka_86

If I am correct compilers will automatically generate a default blank destructor for you anyway on compile time if non is specified. But I think it's good practise to make sure you include a destructor whilst learning about classes. If you don't you'll forget about them and when you come …

Member Avatar for StuXYZ
0
180
Member Avatar for GURU1349

Rebuild the debug version and it should work fine. Might I add that your first method should be run the program from the Command Prompt, rather than using cin.get(); Since they are technically supposed to be run from the command prompt...it will also allow you to see your output. Only …

Member Avatar for Freaky_Chris
0
105
Member Avatar for Anbuvengeance

[code=cplusplus]#include <fstream> ... std::ifstream myfile("blah.txt", std::ios::binary | std::ios::in);[/code] Chris

Member Avatar for Anbuvengeance
0
78
Member Avatar for kaviths

[I]zalezog[/I] please don't add [icode]cin.get()[/icode] to the end of people code snippets, they are not wrong by not using it. I would be more inclined to say you are wrong in using it. Chris

Member Avatar for Freaky_Chris
0
91
Member Avatar for Dannyo329

What exactly is it you want to do with ctime. There isn't alot to it...and when you consider that ctime is justthe newest version of time.h that was written for C it's no wonder alot of the material out there is C based...because it's a C based header file. None …

Member Avatar for Narue
0
125
Member Avatar for osan

You are including a header file more than once, if you are going to do this you need to use #ifndef #define #endif etc etc Chris

Member Avatar for Ancient Dragon
0
281
Member Avatar for Erikmmp

It's because open() expects a null terminated string rather than a string class. you can do the following[code=cplusplus]read_file.open(in_file.c_str());[/code] Chris

Member Avatar for Erikmmp
0
123
Member Avatar for tigerfan88
Member Avatar for Freaky_Chris
0
121
Member Avatar for h3llpunk

Using Win32 Development it will be platform specific. IE it will only work on M$ Windows. [url]http://www.winprog.org/tutorial/[/url] That is a rather nice tutorial on how to get started. You should also use MSDN for a reference manual if you are seriously looking at writing unmanaged Win32 Applications! Chris

Member Avatar for h3llpunk
0
130
Member Avatar for kiranraj1992

[url=http://www.catb.org/~esr/faqs/smart-questions.html]Have[/url] [url=http://www.daniweb.com/forums/announcement8-2.html]a[/url] [url=http://www.daniweb.com/forums/announcement8-3.html]nice[/url] [url=http://www.daniweb.com/forums/thread78223.html]day![/url] Chris

Member Avatar for Freaky_Chris
0
96
Member Avatar for moaath

eeek indent overload. Also what is the problem exactly...? We cannot fix it if we do not know it! Chris

Member Avatar for MosaicFuneral
0
218
Member Avatar for deathevan

You'll have to gets started before people will help you. We don not do your work for you. Google will turn up some material andthe rest you should already know...such as the basics behind it. Chris

Member Avatar for Ancient Dragon
0
70
Member Avatar for kentaki

What exactly do you mean by subset? as in are you trying to list all the different permutations of the numbers?

Member Avatar for iamthwee
-2
141
Member Avatar for jvignacio

Also a starting point would be nice...so we can point out where you have gone wrong. Chris

Member Avatar for Freaky_Chris
0
68
Member Avatar for massivefermion

Next question when you downloaded and installed the Code::Blocks IDE Itrust you actually downloaded the installation that comes with MinGW? Chris

Member Avatar for VernonDozier
0
399
Member Avatar for Mahsa_C++

Does this have to be cross platform? You are kind of confusing me when you say 3- how about clearing the screen ??...without the use of systm("cls"), how do u thinki can write in windows? Gives the impression its just for windows. But other things say linux too...

Member Avatar for Ancient Dragon
0
142
Member Avatar for bita

Since he doesn't seed rand at any point he is always going to get the same number back from it

Member Avatar for Freaky_Chris
0
126
Member Avatar for Bladtman242

if you want even bigger numbers then you can always make your own number data type using a string Chris

Member Avatar for Bladtman242
0
162
Member Avatar for Phil++

Or for a more reliable solution (ei for more than just ASCII) you can use tolower() and toupper() functions found in the cctype header Chris

Member Avatar for grumpier
0
117
Member Avatar for noodlecode

I think that when being class taught you are worse off. You tend to take the information you are fed and that is enough for you, you think it is correct. However when you teach yourself from books and the internet you wonder wether the resources information is actually 100% …

Member Avatar for Freaky_Chris
0
160
Member Avatar for lameassthemity

Use std::string with getline[code=cplusplus]#include <string> ... std::string myString; getline(std::cin, myString);[/code]Hope that helps Chris

Member Avatar for zalezog
0
134
Member Avatar for resystor

When you say you have successfully assembled it, i'm asuming you now have at least one Object file. In which case you need a linker to link the object files together into and exe file. Chris

Member Avatar for BlackSun
0
3K
Member Avatar for david7

[code=cplusplus]#include <iostream> #include <windows.h> #include <ctime> using namespace std; int main(void){ int hours = 36; int mins = 57; int secs = 58; while(1){ system("cls"); if(hours > 0 || mins > 0 || secs > 0){ cout << "Deadline in: " << hours << "h" << mins << "m" << …

Member Avatar for Freaky_Chris
0
271
Member Avatar for massivefermion

1) [url]http://www.cplusplus.com/reference/clibrary/cstdarg/[/url] 2) Application Programming Interface - google it 4) Not a great deal, take XNA development for example.It uses C# the only differnce with developing windows applications to Xbox360 applications is that fact thatyou have to account for the different controller Chris

Member Avatar for Salem
0
99
Member Avatar for TasostGreat

It should be noted that short of speed, you really need to consider how safe fprintf is. Just remember that read chuncks of data at a time is somewhat faster than reading 1 bye at a time Chris

Member Avatar for TasostGreat
0
526
Member Avatar for winrawr

Glad you got it fixed, just remember the number is the amount of array slots you get starting from 0...not what you get upto and including ps mark as solved thanks, Chris

Member Avatar for Freaky_Chris
0
140
Member Avatar for bluebird

This is a very common question, Salems answer will be perfect for you. But you may want to have a look over some of the topics found here, since they all deal with the same problem and have many explanations of what is going on. It saves us quite a …

Member Avatar for bluebird
0
103
Member Avatar for FrancisC07

we prefer to use strings with getline but there we go, it's a much more reliable solution since you don't have to worry about size[code=cplusplus]string test; getline(cin, test); cout << test.length();[/code]Chris

Member Avatar for FrancisC07
0
158
Member Avatar for VBNick

It's down to you to check the state of the shift key and caps locks. So i suggest you do that :P Chris

Member Avatar for VBNick
0
153
Member Avatar for serhannn

Perhaps you should read the entire file in, strip out all html tags as you do so, that way you are left with just text. The go over and process what you have for sentences. But as ddanbe said, this isn't really a job for C++ The closest you will …

Member Avatar for Comatose
0
163
Member Avatar for AdRock

2D enough for you?[code=cplusplus] vector< vector<int> > v; for(int i = 0; i < 10; i++) v.push_back( vector<int>() ); for(int i = 0; i < v.size(); i++){ for(int x = 0; x < 10; x++){ v[i].push_back(x*i); } } for(int i = 0; i < v.size(); i++){ for(int x = 0; …

Member Avatar for BevoX
0
161
Member Avatar for Freaky_Chris

OK, I've been looking at templates recently and eveything was fine...never had a problem with them at any point. But then when I decided to write a function that would either return the given template type or not. the following code explains what I mean.[code=cplusplus]template <class T> T find(char x, …

Member Avatar for Freaky_Chris
0
125
Member Avatar for tomtetlaw

Just a stab, when you move do you redraw the gun? cause you will need to. Chris

Member Avatar for tomtetlaw
0
98
Member Avatar for guest7

[url=http://www.letmegooglethatforyou.com/?q=Generating+Permutations]Chris[/url] edit: just add one to the number lol and loop through??

Member Avatar for MosaicFuneral
0
449
Member Avatar for learning_prog
Member Avatar for John A
0
129
Member Avatar for Kainan54

Flag this for move...or move it now! please :DDDD @OP: read the rules about posting please Chris

Member Avatar for winrawr
0
100
Member Avatar for heimdhal

wouldn't it have to be[code=cplusplus]Rules[this->RuleNum]->min->MembraneOut[0]=A.min.MembraneOut[0]; [/code] Chris

Member Avatar for heimdhal
0
105
Member Avatar for ~gamer4life~

Dive into C++, and get googling for C++ tutorials. [url]http://www.cprogramming.com[/url] [url]http://www.cplusplus.com[/url] Some starting links Chris

Member Avatar for mrnutty
0
80
Member Avatar for azwraith69

Read all of the questions into a vector, which is simple enough just takes one loop. Then you can append to the vector and you can remove items from the vector. Then before quitting besure to clear the text file and re-write everything stored in your vector! Chris

Member Avatar for azwraith69
0
141
Member Avatar for David2x

There is no need to rate yourself. Your talent comes apparent quite quickly and users will help feed that. you might want to think about following a few tutorials and getting a reasonable understanding of the language before trying to join projects. As they mostly consist of people who know …

Member Avatar for David2x
0
169
Member Avatar for michaelmorris

Firstly you should use [code=cplusplus]while(getline(myfile, line)){}[/code] rather than [code=cplusplus]while(!myfile.eof()){}[/code] this is because eof() can return true before the end of a file with some excape characters. Secondly look into the vector header its wonderful its designed with this sort of thing in mind! Chris

Member Avatar for michaelmorris
0
323
Member Avatar for harryoma

The End.