Search Results - CodeGuru Forums
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: sgsawant

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Thread: Timer in C++

    by sgsawant
    Replies
    4
    Views
    618

    Timer in C++

    #include<iostream>
    #include<time.h>
    using namespace std;


    int main(void){
    clock_t start, finish;
    start=clock();
    cout<<start<<endl;
    cin.get();
  2. Re: Efficient Normal Correlation between 2 vectors

    It's all Greek & Latin to me! :P
  3. Re: Efficient Normal Correlation between 2 vectors

    Thanks for the threading idea. Right now I am comfortable with classes. I also find the concept of "template" manageable. Keywords like "inline" etc. is where it becomes a bit difficult for me.

    I...
  4. Re: Efficient Normal Correlation between 2 vectors

    Thanks for the tip to make flsq() inline.

    Hadn't thought about it!!!
  5. Efficient Normal Correlation between 2 vectors

    float crocor(float a[], float b[]){
    float numerator=0;
    float denominator=0;
    float t1=0,t2=0,t3=0,t4=0,t5=0;
    for(int i=0; i<=SCANRAD; i++){
    t1+=a[i]*b[i];
    t2+=a[i];
    t3+=b[i];...
  6. Re: Inverse of a Matrix: Efficient Code (timewise)

    I was aiming for a range of 24X24.

    I found a file through Google:
    http://users.erols.com/mdinolfo/matrix.htm

    He's shown an example with 200x200. In that regard I have a naive question to ask:
  7. Inverse of a Matrix: Efficient Code (timewise)

    I need to find the inverse of a matrix which contains floating point numbers. Can anyone share an efficient (w.r.t. time) code?
  8. Replies
    2
    Views
    2,057

    Re: Convert int to string for use as FILENAME

    Awesome!
  9. Replies
    2
    Views
    2,057

    Convert int to string for use as FILENAME

    void scanimg(IplImage *scnimg){
    for(int k=0; k<SCL_NUM; k++){
    ofstream localfile;
    char s1[20];
    std::stringstream ss1;
    ss1<<k<<".csv";
    s1=ss1.str();
    localfile.open(s1);
    for(int...
  10. Re: VS2008: Bookmarking & Good Practices Question

    Thanks! Those links are real good.
    I have tried asking people about resources on good tips. But I end up getting unrelated answer. This time again, it seems, my example was wrong but those links...
  11. VS2008: Bookmarking & Good Practices Question

    Forgive this naive question:
    Of what use is the "bookmark a line" option in VS2008?

    Please tell if you know any good programming practices in VS2008. To clarify I would like to give an example:...
  12. Re: How to print (OR cout rather) custom error messages?

    Perfect!
  13. Re: How to print (OR cout rather) custom error messages?

    My apologies.
    Here's the actual code:



    void temp_match_img::makevec(){
    if(radpix_set==0) cout<<"The values of the radpix[] array have not yet been calculated!\n";
    assert(radpix_set);
    int...
  14. Replies
    5
    Views
    567

    Re: Debugging for beginner

    @alexibm
    That was a hilarious post but on a serious note such has been the scene in my case too.

    Currently I am somewhat comfortable with debugging, but the question I would like to put forth is...
  15. Replies
    3
    Views
    462

    Re: Outputing a square.

    void display()
    {
    char ch;
    int i, j, side;
    cout<<"Enter character and side"<<endl;
    cin>>ch>>side;
    cout<<endl;

    for(int i=0; i<side/2; i++)
    {
  16. How to print (OR cout rather) custom error messages?

    assert() is a good way to notify errors but I want to cout an elaborate message.
    Of course the following method will work but I needed something better:

    if(error){
    cout<<"Elaborate message";...
  17. Replies
    9
    Views
    1,818

    Re: Number of pixels at radius r

    Oh.. ok. I was a bit concerned about the lower values. I guess if I manually enter the lower values the higher values can be estimated with reasonable accuracy as you have shown.
  18. Replies
    9
    Views
    1,818

    Re: Number of pixels at radius r

    Sorry guys, by "in circle" I meant in the set represented by the circle. Basically the circumference.

    The answer is not very close to 2*(pi)*r - neither is the answer for the number of pixels...
  19. Replies
    9
    Views
    1,818

    Number of pixels at radius r

    I have written the following code to derive find out the average intensities at a given radius from the center of an array.

    void temp_match_img::makevec(){
    int temp;
    for(int i=-radius;...
  20. Replies
    6
    Views
    2,181

    Re: Passing String to a Function

    @CILU:

    Thanks! I will remember this one.
  21. Replies
    6
    Views
    2,181

    Passing String to a Function

    I know the following will look weird but I am simply not able to understand how string passing works.

    #include<iostream>
    #include<ctype.h>
    #include<fstream>
    using namespace std;

    void...
  22. Replies
    4
    Views
    553

    Re: Fundamental Question in Organizing

    Thanks! But what is the resource folder for?
  23. Replies
    4
    Views
    553

    Fundamental Question in Organizing

    When I create an empty Win32 application in VC++, I see 3 folder icons to my left (in the environment):

    Header files
    Resource files
    Source files

    I create main.cpp in the "source files" and a...
  24. Replies
    6
    Views
    670

    Re: A noob question on arrays:

    Thanks! So basically it's the best to be as clear as possible - esp. if one is ready to punch in those extra characters.

    Please correct if wrong.
  25. Replies
    6
    Views
    670

    Re: A noob question on arrays:

    #include <iostream>

    int a[20][20];

    int main()
    {
    std::cout << a[9] << "\n";
    std::cout << &a[9] << "\n";
    std::cout << &a[9][0] << "\n";
    system("pause");
Results 1 to 25 of 27
Page 1 of 2 1 2


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center