Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
P

Pankaj D Dubey

@Pankaj D Dubey
About
Posts
21
Topics
7
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • pre-post increament
    P Pankaj D Dubey

    Dear All, Very Good morning. I am facing some conceptual doubts in post increament and pre increament operators in for loop. Kindly follow the code below: for(int i=0;i<5;i++) { cout<French is the language of love, for everything else there is c++ ...(anonymous)

    C / C++ / MFC c++

  • C++
    P Pankaj D Dubey

    Exactly :) thanks mate, thanks a ton :) Thanks and Regards Pankaj

    French is the language of love, for everything else there is c++ ...(anonymous)

    C / C++ / MFC c++

  • C++
    P Pankaj D Dubey

    If i take another variable say 'Y' and perform the evaluation in that like Y = ++i + (++i); cout<French is the language of love, for everything else there is c++ ...(anonymous)

    C / C++ / MFC c++

  • C++
    P Pankaj D Dubey

    I am in college and we are using Turbo C++. How can i perform the same here?? Thanks & Regards Pankaj

    French is the language of love, for everything else there is c++ ...(anonymous)

    C / C++ / MFC c++

  • C++
    P Pankaj D Dubey

    would u please let me know how to disassemble ?:~

    French is the language of love, for everything else there is c++ ...(anonymous)

    C / C++ / MFC c++

  • C++
    P Pankaj D Dubey

    Hi All, follow the following code please: int i = 2; i = ++i + (++i) cout<French is the language of love, for everything else there is c++ ...(anonymous)

    C / C++ / MFC c++

  • To read a complete string
    P Pankaj D Dubey

    Thank you. Thank you very much for ur support. And ofcourse thank you for tolerating me as well..(as commented by Rajesh)

    French is the language of love, for everything else there is c++ ...(anonymous)

    C / C++ / MFC c++ question

  • To read a complete string
    P Pankaj D Dubey

    Send an example of your text file. I don't think people here has understood your file format.... (from ur previous post) #Its a text file(notepad.txt) Text: 2 Parity: fad90 xyz: 01110000 00000000 00000100 10110000 00000010 00000000 00000000 00000000 00001001 01100000 01000101 00000000 00000000 00000000 11011001 00010000 00000000 00000000 00001111 01111100 11101100 01001110 11101101 11011110 11101101 11101110 1101 ABCD: 1 EFGH: 3 Correction[ 1 ]: 0 (0, 0m) Correction[ 2 ]: 4b (75, 9.375m) Correction[ 3 ]: 2 (2, 0.25m) Correction[ 4 ]: 0 (0, 0m) Correction[ 5 ]: 0 (0, 0m) Correction[ 6 ]: 96 (150, 18.75m) Correction[ 7 ]: 45 (69, 8.625m) Correction[ 8 ]: 0 (0, 0m) Correction[ 9 ]: 0 (0, 0m) Correction[ 10 ]: d91 (3473, -77.875m) Correction[ 11 ]: 0 (0, 0m) Correction[ 12 ]: 0 (0, 0m) Correction[ 13 ]: f7c (3964, -16.5m) I am only getting first character after ':'(not reading newline character) every time but getting, for ex: 4(instead of 4b), d(instead of d91) & so on. mt2 is declared as: char mt2[15]; m_txt1, m_txt2 are the textboxes takes Value(not control) and declared as type CString. Hope this much info. will be sufficient for you people. Even i am trying for the same and hope to get it right soon. Thank you all once again for showing interest in my problem. (Plz follow the previous link to check the code)

    French is the language of love, for everything else there is c++ ...(anonymous)

    C / C++ / MFC c++ question

  • To read a complete string
    P Pankaj D Dubey

    sorry for the same... fopen("some_file.txt","r"); // opening the text file to read Search(fp_mt2, "Text: 2", "xyz"); // search string xyz after string Text for(i = 0; i < 10; i++) // reading 10 strings from 10 lines { // (starting string from each line) fgets(line_buffer, 200, fp_mt2); // reading a line here j=0; while(line_buffer[j]!=':') // starts reading after ':' { j++; } j = j + 2; mt2[i] = line_buffer[j]; // storing the string in an array } m_txt1 = mt2[0]; // output: displaying first string m_txt2 = mt2[1]; // output: displaying second string .............. .............. m_txt10 = mt2[9]; m_txt is the textbox. now, i want to read a complete string but i am getting only first character of every string of every line. where each string carry 2 or 3 characters. would u please help me further, now ?

    French is the language of love, for everything else there is c++ ...(anonymous)

    C / C++ / MFC c++ question

  • To read a complete string
    P Pankaj D Dubey

    fopen("some_file.txt","r"); Search(fp_mt2, "Text: 2", "xyz"); for(i = 0; i < 10; i++) { fgets(line_buffer, 200, fp_mt2); j=0; while(line_buffer[j]!='(') { j++; } j = j + 2; mt2[i] = line_buffer[j]; } m_txt = mt2[0]; " " " " " "........ some 10 times w.r.t every value of mt2[j] m-txt is the textbox. But i am getting only first character of every string of every line. The string carry 2 or 3 characters. j = to reach the perticular line. would u please help me further.

    French is the language of love, for everything else there is c++ ...(anonymous)

    C / C++ / MFC c++ question

  • To read a complete string
    P Pankaj D Dubey

    No, I m not using cin or scanf, i am reading data from a text file, and storing the outputs in arrays and again giving these array values as input to the textboxes so as to get an onscreen display of tht perticular text box.

    French is the language of love, for everything else there is c++ ...(anonymous)

    C / C++ / MFC c++ question

  • To read a complete string
    P Pankaj D Dubey

    Hi All, i want to write a code to read a complete string. The code i have written reads the first word of every string. What all modification is it required to do the same? I am ucing MFC for the same. Thank u all

    French is the language of love, for everything else there is c++ ...(anonymous)

    C / C++ / MFC c++ question

  • Any Example in MFC
    P Pankaj D Dubey

    Thanks Ansuman, Chandrasekharanp

    French is the language of love, for everything else there is c++ ...(anonymous)

    C / C++ / MFC c++ tutorial

  • Any Example in MFC
    P Pankaj D Dubey

    Can i get any example to utilize strcmp() in MFC.

    French is the language of love, for everything else there is c++ ...(anonymous)

    C / C++ / MFC c++ tutorial

  • How to retrieve bits from a file using MFC
    P Pankaj D Dubey

    I am writing a code to read the bits from the file. Starting from first bit, i can read the whole file, and can retrieve the whole data as well. But if i want to retrieve the bits from somewhere between the file, how should i do this? One more thing, i am doing a string comparision of a module(and that module repeats several times in the file) and then i am retrieving the bits hence i can,t apply character counting.

    It was a woman who drove me to drink but I never got opportunity to thank her

    C / C++ / MFC c++ tutorial question

  • Read diffrent formats file in MFC.
    P Pankaj D Dubey

    Hi Dude, You try the following Code, hope it can help u reading the files. Try to reduce the code, its too lengthy.... /****** This function is made to search a given string in the file and returns 1 or 0 *****/ int Search_Tag(char* input_line, char* tag_value) { int tag_len=0; Flag=FAIL; while(*input_line !='\n') { if(*tag_value=='\0') break; else { while(*tag_value!='\0') { if (*input_line==*tag_value) { input_line++; tag_value++; Flag=PASS; } else { Flag=FAIL; input_line++; tag_value++; } } } } if(Flag==FAIL) return FAIL; else return PASS; } /******This function searches the next occurance of the given string in the file******/ GetNext(FILE *ptr_read_file, char *str) { while(1) { fgets(line_buffer, 200, ptr_read_file); // read the input file line by line if(Search_Tag(line_buffer, str)) { break; } } return 0; } /***** This function traverses through the whole file and gives the position of the given strings *****/ int Search(FILE *ptr_read_file, char *str1, char* str2) { while(1) { fgets(line_buffer, 200, ptr_read_file); // read the input file line by line if(Search_Tag(line_buffer, str1)) { GetNext(ptr_read_file, str2); //Find Second Parameter break; } } return 0; } /*********** Reading the File *************/ void CABCDlg::OnButton1() { // TODO: Add your control notification handler code here ctr++; if(ctr == 1) { fp1 = fopen("File 1.txt","r"); //if the file doesnot exist or cannot be opened then return if(fp1 == NULL) { MessageBox("File Not found 'File 1.txt' Check source directory and try again...","Error",0); ctr--; return; } fp2 = fopen("File 1.txt","r"); fp3 = fopen("File 1.txt","r"); Search(fp3, "Object number: 2", "Message contents"); fgets(line_buffer, 200, fp3); /*********** READ 1st Four Bits From the File *********/ for(i=0; i<4; i++) { msg[i] = (fgetc(fp3)); } m_txt1 = msg; UpdateData(FALSE); } } ** Similarly u can read the .csv(dot csv) files as well. Note: Save the files in the same folder where .dsw was saved, to save the search time. All the best :) :)

    French is the language of love, for everything else there is c++ ...(anonymous)

    C / C++ / MFC c++ help tutorial question

  • c?C++
    P Pankaj D Dubey

    Thanx for the adjective used for me(Worst Practice Foundation user). Any way, my question was what are the problems associated with self assignment of an object to itself? Ppl gave me all the comments and on my programming as well rather to answer my question, but yes, i got the answer, please refer the following link: http://faqs.cs.uu.nl/na-dir/C++-faq/part06.html Refer: SECTION [12]: Assignment operators(in the link above) Thanx & Regards

    C / C++ / MFC c++ question

  • c?C++
    P Pankaj D Dubey

    well, Vunic, If you don't worry about self assignment, you'll expose yourself to some very subtle bugs that have very subtle and often disastrous symptoms. :)

    C / C++ / MFC c++ question

  • C/C++, doubt on Friend function
    P Pankaj D Dubey

    A Friend function can be avoided if get()(to read) and set()(to write) member functions(public) are provided on (private) data members of a class. Is it True or False. Can anyone help me clearing this doubt with an appropriate reason?

    C / C++ / MFC c++ help question

  • c?C++
    P Pankaj D Dubey

    Thanx.

    C / C++ / MFC c++ question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups