Posts
 
Reputation
Joined
Last Seen
Ranked #3K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
87% Quality Score
Upvotes Received
5
Posts with Upvotes
5
Upvoting Members
5
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
2 Commented Posts
0 Endorsements
Ranked #818
~35.3K People Reached
About Me

I am here to learn, just like anybody else. - *Learning from the best, sharpening my programming skills.* I try to enjoy myself as much as possible, and take pleasure in whatever I am doing. :) Interests: Linux, Bash Scripting, C++, PHP, MySQL, Qt, Perl

PC Specs
Nothing fancy, solid dual-core machine for desktop, and a single core headless server, built from spare…
Favorite Forums
Favorite Tags

38 Posted Topics

Member Avatar for RJPII

In order to perform operations on your data, you need to load it in the memory in way it is convenient for you to use. If I were you, I would make a structure or class for that purpose - which can hold the data of one record. Then I …

Member Avatar for Syed Umair Mohsin
0
12K
Member Avatar for Microno

You might want to look into STL's [URL="http://www.cplusplus.com/reference/iostream/stringstream/"]stringstream[/URL] for your project.

Member Avatar for Microno
0
172
Member Avatar for daldrome

Probably something is wrong with your includes. In code::blocks, when you add a new file to a project you need to mark them to be included, otherwise you will get an error when you try to compile it. Add them to the project again, or include them manually. - Include …

Member Avatar for kevenm
0
1K
Member Avatar for jackmaverick1

It compiles, but I've got a runtime error, probably because the constructor of class inventory requires a file called "products". Also reading the lines until [icode]!eof[/icode] will make the last element appear twice in your vector, but that's not the real issue. I don't want to be rude, but the …

Member Avatar for jackmaverick1
0
148
Member Avatar for br0wnm4n

Probably you will hate for me saying this, but I don't think you understand how classes really work. If I were I would step back from this assignment, and make a simple class instead, and play with it until I understand the basics. Just write a simple one, with get/set …

Member Avatar for Zvjezdan23
0
390
Member Avatar for tobo

This is an example to how to get the arguments from the command line: [code]#include <iostream> int main ( int argc, char *argv[] ) { std::cout << "Number of arguments: " << argc << std::endl; for ( short i = 0; i < argc; ++i ) std::cout << argv[i] << …

Member Avatar for tobo
0
321
Member Avatar for Forswear
Member Avatar for avenger123321

Your code reminds me of my early days of programming. :) I had an assignment once, and as a student I was very eager to write it, so I jumped right at it. I started to implement all the functions one by one, and I thought I was doing pretty …

Member Avatar for avenger123321
0
358
Member Avatar for rohan121212

You shouldn't put all your arrays in the stack, your program might cause stack overflow, especially when 'n' is chosen to be a large number. You may know what your program is doing, but did you consider what happens if someone else runs it and picks 'n' to be a …

Member Avatar for LRRR
0
142
Member Avatar for sharathg.satya

Read the following link: [URL="http://www.parashift.com/c++-faq-lite/freestore-mgmt.html#faq-16.3"]http://www.parashift.com/c++-faq-lite/freestore-mgmt.html#faq-16.3[/URL]

Member Avatar for deceptikon
0
181
Member Avatar for rfrapp

He is right, there is no pow( int, int ), but maybe(slight maybe) you won't need that at all. There is a shortcut, you can change the base field format of the stream, so you can work on your hexadecimal numbers just like regular numbers. After all, everything in the …

Member Avatar for LRRR
0
585
Member Avatar for aashishsatya

I've never used Turbo C++, but you can get similar results by moving the cursor backwards, and then replacing the letters with white spaces. [CODE]std::cout << "2 + 2 = 4\b5" << std::endl; // replaces 4 to 5 std::cout << "erase\b\b " << std::endl; // replaces "se" with white spaces[/CODE]

Member Avatar for LRRR
0
308
Member Avatar for mikeshadow

Avoid that code above. First of all it doesn't work at all, aside from that, main has no return type, and has no return value either, and that's bad, very bad. Using system("pause") is also not recommended, use cin.get() instead. [code]if ((k%2!=0)&&(k%3!=0)&&(k%5!=0)&&(k%7!=0))[/code] This statement only checks if a number can …

Member Avatar for mikeshadow
0
505
Member Avatar for a.muqeet khan

I just want to remind you for a few thing: Getline only reads until the first delimitation character is found which is by default is '\n' the new line character. Keep that in mind, that you can't read 10000 characters in a c-style string, there are only 9999 available space, …

Member Avatar for thines01
-1
386
Member Avatar for siabenie

It will be a private, this is the default behavior. Any member of your class will be private by default, even your constructors.

Member Avatar for siabenie
0
114
Member Avatar for Hajira Khanum

You need Java Virtual Machine in order to execute a jar file. You can associate jar files with JVM, or just right click on it, then click on "open with" and select java. You are looking for 'JRE', Java Runtime Environment.

Member Avatar for LRRR
1
107
Member Avatar for sasho648

Oh Lord! What have you done?! This is a friendly advice, but before you go any further in the realm of virtual functions, you should go back and review how structures/classes and inheritance work. I am sorry to burst your bubble, but you didn't beat the compiler. With a few …

Member Avatar for LRRR
0
160
Member Avatar for sameerge

Come on, think. :) This is very easy. How do we convert from 24h notation to 12? When someone says it's 23:00 you know, it is 11:00 pm, or 22:00 is 10:00 pm 21:00 is 9, 20:00 is 8. [QUOTE=This is a spoiler!] 24 -> 0 23 -> 11 22 …

Member Avatar for Narue
0
1K
Member Avatar for yinyue

It's been a long time I coded in C, but I don't see any C++ type streams, or std containers, mostly printf, scanf, fprintf, fscanf, fgets, and pointers everywhere. I am sorry, are you coding in C or C++?

Member Avatar for yinyue
0
466
Member Avatar for HacruLeian

There are lot of mistakes in your code. First of all, use vectors instead of arrays. Arrays are evil, and can cause you a lot of headaches, when they go wrong. I am sorry, but almost all of your functions are wrong. :( You are trying to pass your arrays …

Member Avatar for LRRR
0
2K
Member Avatar for guccimane

I really don't want to confuse you but there is another solution you might be interested in. It is called polymorphism. With the use of polymorphism you would only need one type of pointer. One of the benefits of polymorphism is, that you can have the same functions in the …

Member Avatar for LRRR
0
102
Member Avatar for Karlwakim

Probably it won't crash your computer, your operating system won't let it happen.

Member Avatar for LRRR
0
80
Member Avatar for coxxie

First of all it would be a lot safer to use STL's stringstream, instead of extracting the input stream's content this way. There are a few things I would like to mention. In your main function you did not cout your complex class, that is one of the reasons why …

Member Avatar for coxxie
0
457
Member Avatar for Karlwakim

If you are new to C++ I would not recommend you to jump into Qt or C#. Qt is based on C++ and C#'s design is also influenced by C++. If you not familiar with the basics, you will end up constantly bumping into problems, and you certainly won't be …

Member Avatar for Karlwakim
0
228
Member Avatar for manhthaodn

Everything in the memory is in hex. :) Converting numbers to one base to another is fun, however there is a better solution for this. [URL="http://www.cplusplus.com/reference/iostream/manipulators/hex/"]http://www.cplusplus.com/reference/iostream/manipulators/hex/[/URL] [CODE]//http://www.cplusplus.com/reference/iostream/manipulators/hex/ #include <iostream> using namespace std; int main () { int n = 15; cout << hex << n << endl; cout << dec …

Member Avatar for WaltP
0
393
Member Avatar for Hawkpath

In code::blocks if you don't mark your files in your project to be globally included, the compilation later won't be successful. In that case you have to include them manually. Did you try to include "character.cpp" in your main function? I am just guessing here, but I had troubles with …

Member Avatar for Hawkpath
0
8K
Member Avatar for mncoc

You didn't declare those variables, simply put they do not exist. In order to use them you need to declare them first. It is safe to say those 3 should be the parameters of your function. Change the function inline definition accordingly, you may also want give them a type, …

Member Avatar for mncoc
0
163
Member Avatar for Vasthor

[CODE]for (char **curr_point = parr, **bound_point = parr + maxStrings; curr_point < bound_point; ++curr_point)[/CODE] Please someone correct me, if I am wrong but, I don't think it is safe to use such addition : **bound_point = parr + maxStrings; maxStrings = 5 it's an int. The size of a char …

Member Avatar for Narue
0
222
Member Avatar for Reeseoo

Well you just need to declare your functions in your class. [CODE]#ifndef MYCLASS_H #define MYCLASS_H class MyClass { private : int value; float value_float; void foo (); // private function of this class public : // constructors MyClass (); MyClass ( const int& ); //public functions of your class void …

Member Avatar for Reeseoo
0
534
Member Avatar for the_kitoper

If you cout these two, you will understand what is the difference between 1.0 and 1. [CODE]std::cout << ((1 * 10) - 50) / 15 << std::endl; // -2 std::cout << ((1.0 * 10) - 50) / 15 << std::endl; // -2.66667[/CODE] Your code: [CODE]float RoD = 0.5; int level …

Member Avatar for LRRR
0
175
Member Avatar for Kunal0

You can't. You simply need to declare a constructor with no parameters/arguments. [CODE]class A { public : A (); // constructor with no arguments A ( int ); // constructor with one argument . . . A ( int, int, int ); // constructor with three arguments private : int …

Member Avatar for ravenous
0
288
Member Avatar for teha_toshio

Have you tried to comment out the functions one by one, and then putting them back together? So, that way you could find, where is the point when your program starts to hang. Not a sophisticated way of debugging, but it might help narrowing the odds.

Member Avatar for teha_toshio
0
234
Member Avatar for manfredbill

I am wondering under Linux what would 'echo $?' give you back, after you run a program with no return value. My attempt to make such a program have failed : void.cpp:3:12: error: ‘::main’ must return ‘int’. - I am still curious though. @manfredbill - The problem is you are …

Member Avatar for LRRR
0
3K
Member Avatar for Karlwakim

Then you should definitely give a shot to Qt. It easy to work with, and quite well documented. You can create applications with the use of QTcpSocket, and QUdpSocket. - I did. There are many examples out there, however learning can be tricky some times. - Well, I had trouble …

Member Avatar for LRRR
0
152
Member Avatar for bohling

Well, in my opinion you have to ways to do that. Either you utilize your memory and increase your application's speed, or you use less memory but then you will end up with more number crunching - thus getting the results back will take more time.( A lot more with …

Member Avatar for bohling
0
227
Member Avatar for tobby501

We don't know what you've learned, so it is hard to suggest anything, but if you really want to practice, try to solve the problems posted in the other threads. Pick something for your own size, and go for it. :)

Member Avatar for tobby501
0
132
Member Avatar for Karlwakim

I don't want to be rude, but at least take the time to search the forum, there are dozens of threads about pointers and reference. Or google it, you will find tons of pages related to this topic. Btw, did you know, you can find C++ lectures from Stanford on …

Member Avatar for rubberman
0
172
Member Avatar for a.muqeet khan

Oh Lord, that's why the std containers were invented on the first place. Dealing with pointers can be a pain in the neck. They are hard to debug, and one mistake can easily lead to memory leaks. One advice, in C++ use the new operator, instead of using malloc that's …

Member Avatar for LRRR
0
197

The End.