Beginners - May 2009 (Page 3)

Reseting the get pointer
 
I've tried closing and opening the fstream, and ive tried using seekg( 0, ios::beg ) but those arent working for me. Right now i have a function that reads thro...
[3 replies] Last: i think seekg(0) is right for bringing pointer to beginning of a file.... (by jloundy)
dynamic array
 
I need some help for dynamic array. I want to delete an element from massiv pointer. i wrote in devc++. thnks for ur help int *xe, *ye; ...
[5 replies] Last: For example int st and I want to remove the element at st , give i... (by guestgulkan)
Need advice
 
Program for coding/decoding text from file. Problem is with decoding last symbol. First is good. Have no ideas where is wrong. Pehaps you do. Thanx a lot. :s ...
[5 replies] Last: Mines not advanced but it's bigger and bulker I just couldn't put in ... (by kfex)
cerr.....?
 
What is the difference between cout and cerr
[1 reply] : Their output destination is different but it should be the console for... (by Bazzy)
how to open a txt file directly........
 
I wanted to write a program that can open a txt file directly through the operating system. What i mean to say is that when you see a txt file i must be able...
[1 reply] : The first argument passed to your program is the program filename, whe... (by Bazzy)
advice about infile/outfile
 
I am new to c++ and i have a couple of problems i have been tring to find a solution to but am coming up short! first- is my infile am not sure what to use to...
[6 replies] Last: this is just a theory of mine... while(getline(file,line)) { ... (by jloundy)
Reading next line of a file
 
how do you read the next line of a file and print it out? this is my code // reading a text file #include <iostream> #include <fstream> #include <strin...
[12 replies] Last: hmmm... well maybe while(getline(file,line)) { count++; ... (by jloundy)
by jreyes
C++ and OpenCV
 
Hello , Im working with C++ and OpenCV. I haven´t work with C++ since the unviersity, and i need to refresh some things: I have this code: void uconstant...
[no replies]
Question about Class
 
I have a problem about Class. See Class A { public: //copy constructor A(A& ); //here, I dont know why it is A& but not A //other ... } eh,wh...
[2 replies] Last: Here is a detailed explanation on arguments passed by reference: http:... (by Bazzy)
by Forte
Binaries
 
I don't really get binaries, can someone explain what it is? Say for example, how would you make 101101 in base 2 to be equivalent in base 10? Or 5A in bas...
[1 reply] : here is how numerical bases work: 101101 = 1*2 5 + 0*2 4 + 1*2 3 +... (by Bazzy)
Returning array from a function C++
 
Hi Gurus, I'm new to C++, but I have a small background in java. I want to convert the following java code to c++, but returning array is a big trouble for me....
[4 replies] Last: It's conventional to pass in your collections by const reference if th... (by kbw)
by RyanB
while...do loop
 
Hi, first post so slightly nervous! Very new to C++, but as part of my engineering degree we have to 'scratch the surface'! I've had to create a programm...
[7 replies] Last: It is not quite as simple as moving the do{ to the top of the code. ... (by closed account z05DSL3A)
by murva
template error
 
I am trying to write this simple code to test template functionality, but I get the following error: Error 1 error C2668: 'min' : ambiguous call to overloaded f...
[8 replies] Last: I must admit, I do hate seeing using directives , especially at globa... (by closed account z05DSL3A)
Pointer deletion confusion
 
Hi All, I have created a function which returns a matrix object of a class called Matrix by processing another matrix object. What it does is that it gets th...
[2 replies] Last: Thanks for clarifying! (by farhan3d)
by Forte
Question
 
[For each number N in the array, draw a circle whose radius = N and whose color is mySetColor(N). Remember to update the display after drawing all the circles!]...
[2 replies] Last: Is this a Win32 or Console program? I'm going to assume Win32 as I don... (by chrisname)
function template
 
can anyone covert the following function into a fuction template. Thanks a lot! int max(inta, int b){ if (a>b) return a; else return b; }
[2 replies] Last: cheers I have done it:) (by yyfalen)
Finding "strings" in .cpp files
 
For a project i need to find strings in double quotes and output them to screen, My problem is it finds the first double quote in '"', causing it all to go to h...
[10 replies] Last: Sorry, I forgot you were reading the file one character at a time. I w... (by Duthomhas)
how to do a loop if the infilename is not good??
 
Hi, If I was to open a file name but I typed in the incorrect one how would I write up a loop for that? So say if the file name I wanted to open was "calex....
[7 replies] Last: alright thanks i see now, time to switch over (by jloundy)
constant size for arrays
 
Hi guys the size of an array must be known before compilation right? so why does this code work? is my compiler making it work by allocating dynamic memory...
[8 replies] Last: Yeah, now it gives the warning: main.cpp: In function ‘int main(i... (by felipe21)
Need code for bmp file
 
guys need code for reading .bmp files and saving .bmp files in plain C or C++. Can anyone help please... asap.. Thanks in advance..
[6 replies] Last: Iam working on linux(Fedora8).. well, i found one library, and I'm ... (by spydaios)
May 2009 Pages: 12345... 21
  Archived months: [apr2009] [jun2009]

This is an archived page. To post a new message, go to the current page.