Hi@all
Please can anyone tell me why when I run this program, I am getting memory fault error..
1 #include<iostream>
2 using namespace std;
3 int main()
4 {
Type: Posts; User: Apropos
Hi@all
Please can anyone tell me why when I run this program, I am getting memory fault error..
1 #include<iostream>
2 using namespace std;
3 int main()
4 {
Hi Salem
When I don't know the size of array, do I have to use STL vektor. I don't want to use STL vector because I don't know.
Is there another way to count how many elements I have in my...
Hi @all
I was trying to learn dynamic allocation of arrays. I wrote easy program. Can someone tell me why I can't print out all integers in my array.
Thanks
#include <iostream>
Hi Daved;
Thanks for your help. I edited my code and used i instead of i+1. I used i+1 because I thought I was getting first string but I made a mistake by doing that. Thanks
I saw what is...
Hi 7stud;
Thanks for the lesson. You are always my angel :p I think I got you.
I tried some basic things before editting my prog. as following
@mrafcho001 and Daved
I see your point but can you explain me the meaning of the following sentence bacause I don't understand what program wants to do from me?
Thanks for your help
thanks @mrafcho001
I have changed my code to the following code but now I am getting an error..
#include <iostream>
#include <string>
#include <fstream>
Hi@all
I am writing a program about pointers and strings but I am stuck on part of it.
I am trying to read three words from a file. There is only one word in each line therefore I have three...
@grib and 7stud;
Thanks for the lectures. I just got in pointers so I found 7stud examples very helpful. it is not easy to understand but you guys helped me to understand pointers and references....
hi elad,
I am little confused now. Whenever I want to use a pointer as an argument in a function call, I have to pass the address that the pointer references to the function right?.
I know...
grib, thanks for your comment.
I want to pass a pointer call by reference. I wrote a small program that changes the values of the two variables pointed by its arguments. Is this method correct...
Hi skorman00
Thanks for the reply but I am still :confused:
Does it mean that I am passing the pointer to function call by value? If the answer is yes.
Why when I want to print out ...
Hi@all
I am studying pointers from my text book. I think I understood the concept but I don't understand between two small programs that I am showing them below. Can you tell me the diffrence...
Hi Brain Cell;
Yes you are right. I think because of the eof. I don't need size. I use a counter to find out the size.
I am not agree about it because one m is inside the for loop. I also...
@MipZhaP
Yes. It was an accident but thank you for reminding me..
@everybody that put a comment for my thread
Thank you. I apricated for your help. :)
I think you are right. I changed j++ to ++j but still something is wrong because when I write 5 4 3 2 1, the output is 1 1 1 1. I am :confused:
Assume I typed 5,6 and 1 as my input. My output should look like 1 5 6 but I get the same as what I typed.
Thanks
Hi@all
I'm learning the bubble sort from my textbook. I just wrote a small program but something is wrong about output. I couldn't see my mistake. Please help me to see what is wrong with it.
...
I knew that I had to use loop or switch. but I didn't want to put a loop or switch. I wrote here because I was looking another way but I guess I have to use loop or switch..
Thank you
edit;...
Hi @all
I have an if statement in my prog. I want my program ends if my if statement returns false.
In order to end my prog. I used break but g++ compiler says I should put them in a loop or...
Hi@all
I know I should have opened this threat at Tec session but somehow I couldn't open it.
I want to use my USB flash driver with my knoppix linux system. My question is after save something...
Thank you @ PJYelton
I got your point. I appreciate for your help. :)
Hi
@Krak
Thanks for your reply but I need to two loops in my prog because after getting elements of my array from the keyboard, I tried to devide each element to 100 after that I tried to print...
Hi@all;
I think I don't need to write explanation about my code because it is very easy.
Can anyone tell me when I run my prog. why the prog. gives me correct answer only once and after that...
I see what happened. Thanks Prelude and Zach L. I appreciate for your help.