Beginners - January 2015 (Page 20)

Code efficiency and returning multiple values
 
Hi. I'm coming from Matlab to C++ and my head is twisting about itself. I want to write a simple program for printing the solution of a quadratic equation, whe...
[4 replies] Last: Using structs seems to make more sense, so I will stick to that Or yo... (by MiiNiPaa)
Writing a file to a specified path...
 
On line 18, I'd like this file to save in a folder in the same directory called "Usernames". Because I'm using c_str(), it will create a str file instead of a ....
[5 replies] Last: UPDATED CODE: #include <iostream> #include <vector> #include <strin... (by Tenom722)
problem with -->while (std::cin >> currNum)
 
Hi, im trying to learn C++ again and im a bit confused here. Im trying to build a program that would count how many equal numbers are in users input like for e...
[4 replies] Last: shout if you have a problem. i coded up an example while i was eating ... (by mutexe)
Read 20000 .wav data
 
I try to read a .wav file and output 20000 data, then apply fft, but I got some problems. (realize the function 'wavread' of Matlab in c++) Here is my code. ...
[3 replies] Last: But when I use sizeof(long), the program returns me some stuff weird.... (by coder777)
by maglia
C++ flowchart
 
Hello. I have to draw a flowchart of C++ program. We did not do this on classes, so I have no idea how to do that. Here's the program: #include "stdafx.h"...
[1 reply] : I don't know much about C++/CLI i'm afraid (as what you've posted isn'... (by mutexe)
switch case break
 
CAN YOU PLEASE HELP ME FIX MY CODES ASAP PLEASE TYVM :( #include <iostream> using namespace std; int main () { int number = 0; cout<<"Enter...
[4 replies] Last: Okay Thanks I get it haha (by Christian0555)
C++ graphics tutorial for beginners
 
How to create graphics in c++ and create some Animation and Games Tutorial for Beginners,Watch this whole Playlist. https://www.youtube.com/playlist?list=PL...
[no replies]
Delete Entry
 
Desired Output: address book what would you like to do? add edit delete view search exit please enter your choice: 4 . . . No. FN Ln Add Cnum 1 ...
[7 replies] Last: Thank you! It now works! The only problem i had is my structure is a c... (by Vandalism)
Can´t find out the code for character < in c++
 
Can´t find out the code for character < and > in c++
[1 reply] : @patriic48 cout << "\x28 \x29" << endl; cout << char(40) << "... (by whitenite1)
Array of objects without explicit constructors
 
I have a class: class myClass { double x=0; double y =0; public: std::vector<double> xpoint1, xpoint2, ypoint1, ypoint2; void foo(const std...
[1 reply] : I replied to your other post. (by kevinkjt2000)
C++ Program to square a number
 
I need to write a program that reads in an integer and writes the square of the entered value. *Get the input with a function called getNumber() * Display th...
[4 replies] Last: well if your just squaring it u can just do it times its self. #inc... (by kmtompkins)
Parsing
 
How can I put the lines of a file into an array, if I don't know the number of lines beforehand? Below is what I do in Python. with open(file_input_sa...
[1 reply] : Use a vector of strings: http://www.cplusplus.com/reference/vector/vec... (by kevinkjt2000)
by Selver
Reading from text file
 
Working on an assignment for my algorithms class, the code is supposed to read in input from a given text document, reverse the given set of letters, and then o...
[4 replies] Last: Okay, I feel retarded. I included fstream but declared my infile as of... (by Selver)
by meme44
Help with Shapes!
 
I'm wondering how to create the following shape with loops. We worked on a few others in class, but I wasnt overly comfortable with them, and wanted to try some...
[1 reply] : Try understanding the underlying mathematical pattern first. Each row... (by kevinkjt2000)
Homework Assignement. Please, help
 
Hi, i am new to c++ programming , i have to write a program for homework. It has to include a function with a prototype int max_min9(int n). n is a three-digit ...
[1 reply] : What if you would go directly into a string, and sort it both ascendin... (by keskiverto)
Undefined var still prints
 
how can this code work? how can it print num1 in main function when num1 has not been defined as a var by me??? #include <cstdlib> #include <iostream>...
[2 replies] Last: Yes, indeed num1 was defined by you. num1 was defined by you in line ... (by tipaye)
Automata theory!!!!!
 
How can i create a program with an input string and follows the ff. rules in Dev C++. first rule Identifiers: starts with a-z and ends with a-z and 0-9. sec...
[1 reply] : Where do you get stuck? What part do you not know how to do? What do... (by kevinkjt2000)
Unknown error in the code.
 
This code is giving the error: Pl.cpp:39:7: error: non-ASCII characters are not allowed outside of literals and identifiers cout<<‘enter l : ‘ Pl.cpp:3...
[4 replies] Last: I'm guessing you did copy & paste with this. If so, you didn't get pur... (by tipaye)
How to make a program or function run within a specified time period?
 
I've been researching on it for quite a while but still don't know how to do it. #include<chrono> seemed to be the answer at one point but then I realized I can...
[3 replies] Last: A bare-bones do-little example then: #include <unistd.h> #include <ct... (by tipaye)
Triple character in char array..
 
why doesnt it work ? how can i fix it ? #include <iostream> #include <string.h> #include <stdlib.h> #include <stdio.h> using namespace std; int main() { ...
[11 replies] Last: Keskiverto is right. The best way to do this is to use std::string, b... (by dhayden)
January 2015 Pages: 1... 1819202122... 39
  Archived months: [dec2014] [feb2015]

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