Beginners - January 2014 (Page 25)

Not sure how loops iterate over multidimensional arrays.
 
Hello, I'm learning c++ and an assignment was to write a program that adds the elements in multidimensional arrays. I have completed the program but I'm not exa...
[5 replies] Last: Type. myChar has a character type. The print function is made to wri... (by Mechennyy)
dynamic memory allocation
 
I had function call hci_host_data_pkt_gen() in another function main_function() , I want to know about the memory allocated(hci_host_data_pkt_arr = new()), ...
[1 reply] : [quote=amitk3553]I want to know about the memory allocated(hci_host_da... (by MrHutch)
Matrix Multiplication, Addition using Class and dynamic memory
 
Hi guys. I am working on a programm for matrix multiplication and addition and have some mistake that i dont understand.I really appreciate if you guys could h...
[3 replies] Last: show the modified code. What is line 111? (by coder777)
Code not working.
 
Nothing pops up after I type in length. Any advice?(This code is a WIP) #include <iostream> using namespace std; char type1 ; c int main() { ...
[3 replies] Last: [quote=Dput]What Lb meant: type1 == "length--------------------";//p... (by LB)
Functions that returns two int variables or two char variables.
 
Is it possible to have a function (non-void) that returns two variables i.e. int blah(int a, int b) { //code return a, b; } not return a+b/a*b etc....
[13 replies] Last: [quote=Nathan2222]So it's better to pass by reference? No - please rea... (by LB)
Subscript Functions
 
Hi :) I need help understanding the subscript function in line 4 of the code. I know it is supposed to give element access, but I'm not sure how (what does ele...
[1 reply] : Look up dynamic arrays. Type *p = new Type ; //p points to first eleme... (by LB)
by Sypher
Reading a text and storing it into a vector with different variables.
 
Hi there, I have an issue I need some help with. So basically, I have these saved text files from the vectors in my program and they show as : Pizza.txt Ha...
[1 reply] : You're getting the error because vector<T>::push_pack() takes only one... (by maeriden)
How to Load a New Image in a FLTK Window
 
I was wondering how I would go about loading a new image in a FLTK Window after having pressed a button. In my case, the new image would come from a vector with...
[1 reply] : Usually, we choose to load new image to web or windows application fro... (by EisenhowerPDF)
If string contains the word "x" do something?
 
Hello How can i make an if with a text detection? i want to do something like- if the string contains the word "text" do something- how do i do that? Thanks....
[13 replies] Last: Fair enough LB. I don't consider it nitpicking considering you often a... (by CplusplusAcolyte)
2D vector usage
 
I know there are multiple threads relating to the declaration and usage of 2D vectors, but I'm having trouble wrapping my head around how it works and the threa...
[8 replies] Last: I missed that earlier, Catfish666. Thanks, this is much better. I simi... (by CplusplusAcolyte)
trouble with accessing member functions of vector components
 
Hi, I'm trying to make a chess game and I could have sworn I hadn't changed the code at all since a day or two ago, and it ran perfectly well then, but it does...
[4 replies] Last: Well I feel dumb. Thank you, it works now. (by Nogroth)
by wolfv
pass an array of pointers to constructor initialization list?
 
How to pass an array of pointers to a constructor initialization list? My failed attempt is on line 18: #include <iostream> using namespace std; class A { p...
[3 replies] Last: This works: #include <iostream> using namespace std; class A { pri... (by wolfv)
individual output
 
Alright I am trying to make a program that takes in a persons name and saves it into a list a outward txt file and I know how to do that but I also want it to b...
[1 reply] : What is wrong with the example given in your other thread. http://www.... (by Hippogriff)
Unfortunantly It Runs too slow :(
 
I Want to solve problem 69 of project euler, It is correct But It Runs too slow!! Damn it!! :( How Can I Speed Up this?!? Any Ideas??!? #include <iostre...
[10 replies] Last: and I mean that you don't need to. (to abbreviate, lets call f(n) = ... (by khengol khan)
by Sypher
Help with storing the content of vector into txt
 
Hi there guys, I need some assistance from an assignment I'm working on. I need to store the contents of my vectors into a text file, I've tried using other met...
[2 replies] Last: That is exactly what I was looking for, thank you so much ! I can appl... (by Sypher)
Cin and Cout statements
 
Hi all, it seems that every time that I try to run this code it come up with an error stating that the 'fulltotal' and 'fullinput' are not initialized and I am...
[2 replies] Last: [code firstline=7] double fullcases, fullservings, fullliters,fullinpu... (by Catfish666)
Error: data member initializer is not allowed
 
When I try to initialize the char variable in my class it gives the error message in title, but if I create the variable in main it is fine? Can anyone see the ...
[8 replies] Last: Thanks Dput that worked... Here's my code, is there anything wrong wit... (by ALEXCX2PLUS)
Find max, average values in file
 
Greetings everyone, My class is the "review basic code" phase, as it has just started up. The goal is to find the highest value from a file, average, and ou...
[7 replies] Last: Problem has been solved! Below is the code and output if anyone is cur... (by Oh Hey Its Z)
Need help with setw ()
 
Hi there, I have got an assignment, our teacher told us to create a program which displays result based on the inputs and displays the data, he told us to use s...
[7 replies] Last: Good point, LB. (by CplusplusAcolyte)
Basic Calculator Solution
 
So I have recently started studying C++ and my tutor had given us assignments to make a command line calculator. The following code is a basic calculator tha...
[12 replies] Last: Thanks for the clarification. (by CplusplusAcolyte)
January 2014 Pages: 1... 2324252627... 44
  Archived months: [dec2013] [feb2014]

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