Search Results

Showing results 1 to 34 of 34
Search took 0.01 seconds.
Search: Posts Made By: amrith92
Forum: C++ 18 Days Ago
Replies: 4
Views: 249
Posted By amrith92
>> Why it is necessary?

Well, it shouldn't be... I tried the code separately on both GCC and minGW compilers, and both compiled well and didn't complain...

Try adding the statement using...
Forum: C++ 18 Days Ago
Replies: 6
Views: 341
Posted By amrith92
#include <cstdlib>
#include <iostream>
#include <fstream>

using namespace std;

int main(int argc, char *argv[]){

string line = "";
int lineLength = 0;
Forum: C++ 18 Days Ago
Replies: 8
Views: 352
Posted By amrith92
Could you attach a copy of the file "ip.txt", so that we can have a look at it? Further, how is the file generated, i.e, as another program's output, or written manually with a text editor?

You...
Forum: C++ 19 Days Ago
Replies: 3
Views: 209
Posted By amrith92
Nope, that's absolutely fine. You won't need to change the function call, even if you add more code, that is unless and until you change the functions' arguments or something... :)
Forum: C++ 19 Days Ago
Replies: 8
Views: 352
Posted By amrith92
Why not try this:

#include <iostream>
#include <fstream>

using namespace std;

int main()
{
ifstream iptilvar;
Forum: C++ 19 Days Ago
Replies: 3
Views: 209
Posted By amrith92
Okay, before I answer your question, a few things need to be cleared. In all the code I've seen till now, <ionstream> is by far the most striking alternative to the known, and beloved <iostream>...
Forum: C++ 19 Days Ago
Replies: 8
Views: 430
Posted By amrith92
Okay first things first...
What exactly are you trying to achieve with this code?

Secondly, You can get rid of some of these errors:

1. 17: error: `islowerCase' undeclared (first use this...
Forum: C++ Oct 19th, 2009
Replies: 8
Views: 227
Posted By amrith92
If cin.ignore(); fails, then try clearing the input stream, before accepting input. This can be done with cin.clear();.

If all your inputs are failing, then maybe try the following:

1. Clear...
Forum: C++ Oct 19th, 2009
Replies: 8
Views: 227
Posted By amrith92
Try adding a cin.ignore(); statement before each of your inputs.

See this: http://www.cplusplus.com/reference/iostream/istream/ignore/

Incidentally, its better you don't use fflush(stdin);....
Forum: C++ Oct 19th, 2009
Replies: 4
Views: 350
Posted By amrith92
You could try this:

FILE *in;
char line[1000];
char *token;
in = fopen(argv[1],"rt+");
if ( in == NULL) exit(1);
int i=0;
// Read the first line... move the file...
Forum: C++ May 28th, 2009
Replies: 8
Views: 321
Posted By amrith92
> What am I doing wrong???

A lot! .... but nothing that you can't learn from, with a little bit of effort... Your struct contains 2 functions, both of which can directly access the other struct...
Forum: C++ May 25th, 2009
Replies: 13
Views: 669
Posted By amrith92
Did you actually go through the links I gave, and the clue I provided in my previous posts? If so, did you not understand it? and no, your code still will read your file line-by-line.

> read from...
Forum: C++ May 25th, 2009
Replies: 13
Views: 669
Posted By amrith92
I have no idea where you are going to put this, so I don't know what it will accomplish. If it is inside your while-loop, then, no it will not help at all. Anyway, this approach undermines the...
Forum: C++ May 25th, 2009
Replies: 13
Views: 669
Posted By amrith92
while (getline(iofile,line))
{
cout << line << endl;
}


Your code is on the right track. Check out the getline function's prototypes here: getline - C++ Reference...
Forum: C++ May 23rd, 2009
Replies: 7
Views: 385
Posted By amrith92
> I have come as far as estimating fundamental matrices for the cameras.

You have mentioned in an earlier post that you know the camera's calibration. When you talk about a fundamental matrix...
Forum: C++ May 22nd, 2009
Replies: 12
Views: 1,056
Posted By amrith92
Yeah, this is a good algorithm to use for the same...
Forum: C++ May 22nd, 2009
Replies: 7
Views: 385
Posted By amrith92
An image has to be described on a 2D plane, so the z-coordinate does not come into play here. If you just want stills of your 3D simulation, maybe you should just try writing the pixel information of...
Forum: C++ May 22nd, 2009
Replies: 12
Views: 1,056
Posted By amrith92
I hadn't realized that... thanks! :) ... But it does work as std::string in my IDE (Dev C++), and it (I mean, including <string.h>) does not produce any backward warnings at all...
Forum: C++ May 22nd, 2009
Replies: 12
Views: 1,056
Posted By amrith92
Are you sure that this program compiles? You seem to have used string in your code, but you haven't included <string.h> at all...!

Apart from that, could you tell us what IDE/compiler you are...
Forum: C++ May 19th, 2009
Replies: 13
Views: 554
Posted By amrith92
Okay, lets see:

// Classes.h

#ifndef CLASSES_H_INCLUDED
#define CLASSES_H_INCLUDED

class BClass
{
/*...*/
Forum: C++ May 19th, 2009
Replies: 13
Views: 554
Posted By amrith92
I think that your problem here is this line here:


#include <cstdlib>
#include <iostream>
#include <main.h> // <- See this?? What is this?? Try deleting this

using namespace std;

int...
Forum: C++ May 19th, 2009
Replies: 13
Views: 554
Posted By amrith92
Okay, I haven't fully understood your first question, but I'll try and clear up parts of it that I have understood. Just tell us what you want to do in context of the following, or, if this isn't it,...
Forum: C++ May 19th, 2009
Replies: 9
Views: 514
Posted By amrith92
A tutorial is supposed to teach you methods of doing something: in this case - "How to build a singly linked list". You could have easily emulated the workings of that list and incorporated it in...
Forum: C++ May 18th, 2009
Replies: 4
Solved: binary I/O
Views: 272
Posted By amrith92
Glad it helped! :)
Forum: C++ May 18th, 2009
Replies: 4
Solved: binary I/O
Views: 272
Posted By amrith92
Of course this code wouldn't create a.dat. You are asking it to open the file, not create it with those parameters.

Try the code below:

#include <iostream>
#include <fstream>

using...
Forum: C++ May 18th, 2009
Replies: 9
Views: 514
Posted By amrith92
I'm sorry, but I have to agree with ArkM - there's a ton of mistakes in the provided code. Just go through it, step by step and straighten out the code.

You may also like to see this:...
Forum: C++ May 18th, 2009
Replies: 8
Views: 407
Posted By amrith92
Yes, I tend to agree with Narue. I would take a pot-shot and ask for you to check the closing statement of your Graph class, and make sure that it terminates with a };
Forum: C++ May 18th, 2009
Replies: 9
Views: 656
Posted By amrith92
Hi!

Glad it helped! :) and yes, it was the braces which was the main problem. Just remember to put braces even for the simplest of all switch(case) statements, especially if you are going to nest...
Forum: C++ May 16th, 2009
Replies: 9
Views: 656
Posted By amrith92
I would also like to mention that from the memory side of things, and from the program logic, you might like to use:

BOOL CALLBACK DlgProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);...
Forum: C++ May 16th, 2009
Replies: 9
Views: 656
Posted By amrith92
Hi!

I compiled your program, and it compiled successfully, but I never got the GUI part of it to work. I made some modifications to your code, and now its running, but I've no idea if it will...
Forum: C++ May 16th, 2009
Replies: 9
Views: 656
Posted By amrith92
Could you provide us with your complete program code, so that we can compile and debug it?
Forum: C++ May 15th, 2009
Replies: 9
Views: 656
Posted By amrith92
Maybe you should try this:

Make the following Window Handles Global:

HWND hWndPrincipal;
HWND hWndPrincipal2;
HWND hWndPrincipal3;
HWND hWndPrincipal4;

I'm not sure if this will work, but...
Forum: Web Browsers Jul 17th, 2008
Replies: 4
Views: 3,331
Posted By amrith92
Have you tried 'enable cookies' options?
Forum: C++ Jul 13th, 2008
Replies: 7
Solved: any ideas???:?:
Views: 556
Posted By amrith92
I agree with iamthwee. There seems no point in that segment of code! It checks a relation: if a is equal to zero or not, if a is less than b, otherwise it relates b to 0, which is pointless.

Is...
Showing results 1 to 34 of 34

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC