我不知道该怎么办?请帮忙. [英] i dont know what should i do?plz help.

查看:87
本文介绍了我不知道该怎么办?请帮忙.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

#include "stdafx.h"
#include "stdafx.h"
#include <iostream>
#include <string>
using namespace std;
int jomleTokalame(string *a,string c,int count){
 string cc="";
 count =0;
 for(int i = 0 ; c[i]!='\0';i++){
  cc+=c[i];
  if (c[i]==' ' || c[i+1]=='\0'){
   a[count]=cc;
   count++;
   cc="";
  }
 }
 //tedade kalamat ro mide
 return count;
}
int _tmain(int argc, _TCHAR* argv[])
{
 int location[100];
 string str[100];
 string a;
 string s;
 int n,i=1,j,g,address=99,ch;
 int ram[100];//4taii
 int memory[100];
 /*cout<<"plz enter number of lines:\n";
 cin>>n;
 forfor(i=0;i<n;i++){
  cout<<"enter:\n";
  cin.get(a,60);
  g=jomleTokalame(str,a,0);
  cout<<'\n'<<g;
  for(j=0;j<=g;j++)
   cout<<str[j];
 }*/
 string matn[100];
 s="30 input x";
 int loc=0;
 g=jomleTokalame(matn,s,0);
 //while(i<g){
  /*if(i==0){//tabdile string to int?????????????
   location[i]=matn[i];
   i++;
  }*/
 i=1;
 cout<<matn[i];
  if(matn[i]=="input"){
   cout<<"sa;";
   memory[loc]=10;
   ram[loc]=memory[loc]*100+address;
   address--;
   cout<<"ram="<<ram[loc]<<'\n';
   loc++;
   cout<<address<<'\t'<<loc;
   i++;
  }
}




例如,在此程序中,我想将(30 input x)更改为四位数,并将其放入ram数组中. :confused:




For example in this program I want change the (30 input x) to a four-digit number and put them into the ram array. :confused:

Thanks in advance!

推荐答案

根据您发布的内容,没有编译错误,只是警告.这些警告很容易解决:只需删除它们指出的变量即可.警告说您声明了一个变量,但您从未使用过"....如果它们没有用,那就摆脱它们.

如果您的问题与这些警告无关,请描述您要采取的措施.
According to what you posted, there is no compilation error, just warninds. And theses warnings are easy to solve: just delete the variables they point out. Warnings say ''you declared a variable but you never use it''... If they are not usefull then just get rid of them.

If your problem is not related to these warnings, then please describe what you are trying to do.


这篇关于我不知道该怎么办?请帮忙.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆