Beginners - April 2014 (Page 62)

by Taylrl
Removing characters from a .csv file that should contain only numbers
 
Hi, I currently have a .csv file that should only contain numerical values however there are errors in some columns that mean there is text included. I am won...
[4 replies] Last: You are the OP: http://netforbeginners.about.com/od/internetlanguage/f... (by Smac89)
TXT File to Array C++
 
Hello, I recently recieved this lab for my computer science class, but I was absent the day we learned how arrays work, so I am having a tought time with this o...
[7 replies] Last: @LB Never mind, I took no offense, just justifying my motives! I sugge... (by Just Me)
by axk341
wanna generate square wave
 
want to generate square wave which repeats every period. but the thing in for{} isn't repeating. plz help me with this. fstream fout; fout.open("data...
[4 replies] Last: if (period <= time <= period/2) This doesn't due what you expect. ... (by Disch)
What's wrong with my code?
 
My program compiles successfully, my compiler is g++ 4.8.1 on Linux Mint 16. The compiler throws off no errors, but the program doesn't do what it should. The p...
[8 replies] Last: @LB Thanks, all of you! (by Just Me)
Linker Error "undefinied reference to" Encounter::enemy
 
Hey guys, Sadly I can't get along a Linker Error here. I don't even known why. I added all files to my project so they compile - did nothing new with Encount...
[4 replies] Last: .hpp is considered a header file and won't get compiled. It's meant t... (by AbstractionAnon)
File Input/Output
 
Hello, My program reads in 3 numbers from a resource file name "data2.txt" data2.txt: ------------- 3 4 5 ------------- and attempts to read the n...
[3 replies] Last: yes (by Little Bobby Tables)
by cybr
task
 
Consider a quadratic expression, say x2 – x ‐2. Describing where this quadratic is positive, involves describing a set of numbers that are either less than...
[2 replies] Last: bool isPositive(int x) { ... } Go from there (by Smac89)
Text file and vectors
 
Hi I have a text file that has 9 columns. How do I access columns 7 and 8 and multiply these values together? My text file only consists of numbers. Both int a...
[14 replies] Last: Lines 36-37 should be unnecessary. product is only changed at line 22... (by AbstractionAnon)
When to Use Inline Functions
 
I've just googled it and I find out when to use them, but I don't know what they mean: • Function calls (including parameter passing and placing the object...
[6 replies] Last: nice example of where stackoverflow isn't always perfect: wrong answer... (by Cubbi)
This compiles, but I cannot get to work
 
I'm having a hard time figuring this out. Just started programming and would appreciate some help/pointers on how to fix this. Thanks! //Purpose: Thi...
[2 replies] Last: 1. Add this at the end: return 0; } 2. what do you mean by this?... (by mutexe)
Snake Game Help
 
i have some problem in changing Direction of my snake,how to change this code,because of using cout<<"***"; i have this problem,i know i have to save every loca...
[no replies]
Logistic Map
 
Hi, I need somehelp to build a programm for logistic map. f(x)=xL(1-x) where L is fixed. I need to create an array and then save it as a file. tr-trajectory...
[1 reply] : What should be in the array tr ? (by keskiverto)
typeid operator...
 
//I am trying to discover the equivalent of instanceof (of JAVA) for C++ //Well, I discover that typeid() could be an option... //What are the problems in my ...
[6 replies] Last: Sorry for not responding immediately. Thank you very much! Your answer... (by closed account jvqpDjzh)
Enum and struct question
 
So I got this line in a txt file: Libra 10 - 10 - 1980 with this declaration: enum Zodiac { Aquarius, Pisces, Aries, Taurus, Gemini, Cancer, Leo, Virgo,...
[9 replies] Last: yep sorry. A collection is just a bunch of stuff, wther it be a STL ve... (by mutexe)
C++ accepting input in a character pointer using new
 
Hello, please i need help. i need to create "Title"(it is a data member of a class) which is a string of variable size and it is dynamically created and defau...
[7 replies] Last: Unless your assignment or professor says you have to use C-style strin... (by LB)
execl function with pipe
 
How can I run the following command using execl ? echo "put <filename>" | sftp -i <private_key> <username>@password execl(...) Many thanks! Added: P...
[no replies]
Correct Matrix not printing in Visual Studio
 
I have made a Matrix Struct in Visual Studio to use with a linear algebra operations library I am also making but when I am trying to print a test Matrix in mai...
[no replies]
cin.getline questions
 
So I have to write a program that will open a users file then load an array with the contents of the array, and I must use cin.getline() to do this the issue is...
[13 replies] Last: Remember to pass pointers and to make sure the destination has enough ... (by Daleth)
I don't know why it doesn't work
 
It douesn't give any error, but I need to know why when I execute it, it doesen't order the numbers that I introduce there, and only give's the bigger one. I t...
[2 replies] Last: The only incorrect thing whas the return maximo that it wasen't in t... (by jonanderdiez)
seekp & seekg not pointing same value..
 
Hi.. seekg and seekp are giving different values from the below program.. Pl someone help by explaining what is going on here because of getline function pre...
[2 replies] Last: Understood now.. if we use temp.clear() , then seekg also becoming loc... (by johnwesley123)
April 2014 Pages: 1... 6061626364... 67
  Archived months: [mar2014] [may2014]

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